fix(invalidation): do not invalidate an area if it's not on a visible screen
This commit is contained in:
@@ -490,10 +490,13 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
|
|||||||
/*Invalidate the object only if it belongs to the current or previous'*/
|
/*Invalidate the object only if it belongs to the current or previous'*/
|
||||||
lv_obj_t * obj_scr = lv_obj_get_screen(obj);
|
lv_obj_t * obj_scr = lv_obj_get_screen(obj);
|
||||||
lv_disp_t * disp = lv_obj_get_disp(obj_scr);
|
lv_disp_t * disp = lv_obj_get_disp(obj_scr);
|
||||||
if(obj_scr == lv_disp_get_scr_act(disp) ||
|
if(obj_scr != lv_disp_get_scr_act(disp) &&
|
||||||
obj_scr == lv_disp_get_scr_prev(disp) ||
|
obj_scr != lv_disp_get_scr_prev(disp) &&
|
||||||
obj_scr == lv_disp_get_layer_top(disp) ||
|
obj_scr != lv_disp_get_layer_top(disp) &&
|
||||||
obj_scr == lv_disp_get_layer_sys(disp)) {
|
obj_scr != lv_disp_get_layer_sys(disp))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*Truncate the area to the object*/
|
/*Truncate the area to the object*/
|
||||||
lv_area_t obj_coords;
|
lv_area_t obj_coords;
|
||||||
@@ -518,7 +521,6 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
|
|||||||
|
|
||||||
par = lv_obj_get_parent(par);
|
par = lv_obj_get_parent(par);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user