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) {
|
||||
if (self->item_removed) {
|
||||
self->dirty_area.next = tail;
|
||||
tail = &self->dirty_area;
|
||||
}
|
||||
if (! self->hidden){
|
||||
if (self->item_removed) {
|
||||
self->dirty_area.next = tail;
|
||||
tail = &self->dirty_area;
|
||||
}
|
||||
|
||||
for (int32_t i = self->members->len - 1; i >= 0; i--) {
|
||||
mp_obj_t layer;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]);
|
||||
if (draw_protocol != NULL) {
|
||||
layer = draw_protocol->draw_get_protocol_self(self->members->items[i]);
|
||||
tail = draw_protocol->draw_protocol_impl->draw_get_refresh_areas(layer, tail);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &displayio_tilegrid_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
tail = displayio_tilegrid_get_refresh_areas(layer, tail);
|
||||
continue;
|
||||
}
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &displayio_group_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
tail = displayio_group_get_refresh_areas(layer, tail);
|
||||
continue;
|
||||
for (int32_t i = self->members->len - 1; i >= 0; i--) {
|
||||
mp_obj_t layer;
|
||||
#if CIRCUITPY_VECTORIO
|
||||
const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, self->members->items[i]);
|
||||
if (draw_protocol != NULL) {
|
||||
layer = draw_protocol->draw_get_protocol_self(self->members->items[i]);
|
||||
tail = draw_protocol->draw_protocol_impl->draw_get_refresh_areas(layer, tail);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &displayio_tilegrid_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
if (!common_hal_displayio_tilegrid_get_hidden(layer)){
|
||||
tail = displayio_tilegrid_get_refresh_areas(layer, tail);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
layer = mp_obj_cast_to_native_base(
|
||||
self->members->items[i], &displayio_group_type);
|
||||
if (layer != MP_OBJ_NULL) {
|
||||
tail = displayio_group_get_refresh_areas(layer, tail);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user