don't consider refresh areas for hidden groups or tilegrids
This commit is contained in:
parent
bf67ea3640
commit
06057a63e6
|
@ -438,32 +438,36 @@ void displayio_group_finish_refresh(displayio_group_t *self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
displayio_area_t *displayio_group_get_refresh_areas(displayio_group_t *self, displayio_area_t *tail) {
|
displayio_area_t *displayio_group_get_refresh_areas(displayio_group_t *self, displayio_area_t *tail) {
|
||||||
if (self->item_removed) {
|
if (! self->hidden){
|
||||||
self->dirty_area.next = tail;
|
if (self->item_removed) {
|
||||||
tail = &self->dirty_area;
|
self->dirty_area.next = tail;
|
||||||
}
|
tail = &self->dirty_area;
|
||||||
|
}
|
||||||
|
|
||||||
for (int32_t i = self->members->len - 1; i >= 0; i--) {
|
for (int32_t i = self->members->len - 1; i >= 0; i--) {
|
||||||
mp_obj_t layer;
|
mp_obj_t layer;
|
||||||
#if CIRCUITPY_VECTORIO
|
#if CIRCUITPY_VECTORIO
|
||||||
const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]);
|
const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]);
|
||||||
if (draw_protocol != NULL) {
|
if (draw_protocol != NULL) {
|
||||||
layer = draw_protocol->draw_get_protocol_self(self->members->items[i]);
|
layer = draw_protocol->draw_get_protocol_self(self->members->items[i]);
|
||||||
tail = draw_protocol->draw_protocol_impl->draw_get_refresh_areas(layer, tail);
|
tail = draw_protocol->draw_protocol_impl->draw_get_refresh_areas(layer, tail);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
layer = mp_obj_cast_to_native_base(
|
layer = mp_obj_cast_to_native_base(
|
||||||
self->members->items[i], &displayio_tilegrid_type);
|
self->members->items[i], &displayio_tilegrid_type);
|
||||||
if (layer != MP_OBJ_NULL) {
|
if (layer != MP_OBJ_NULL) {
|
||||||
tail = displayio_tilegrid_get_refresh_areas(layer, tail);
|
if (!common_hal_displayio_tilegrid_get_hidden(layer)){
|
||||||
continue;
|
tail = displayio_tilegrid_get_refresh_areas(layer, tail);
|
||||||
}
|
}
|
||||||
layer = mp_obj_cast_to_native_base(
|
continue;
|
||||||
self->members->items[i], &displayio_group_type);
|
}
|
||||||
if (layer != MP_OBJ_NULL) {
|
layer = mp_obj_cast_to_native_base(
|
||||||
tail = displayio_group_get_refresh_areas(layer, tail);
|
self->members->items[i], &displayio_group_type);
|
||||||
continue;
|
if (layer != MP_OBJ_NULL) {
|
||||||
|
tail = displayio_group_get_refresh_areas(layer, tail);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue