From 9da41a50cb3e149f15e61b44223bcb24a09d809c Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Wed, 3 Mar 2021 16:44:28 +0900 Subject: [PATCH] evas_object_smart: enhance logic checking clipper visibility Summary: If current clipper object is equal to previous clipper object, then the value of visible (or alpha) is same, because it is same object. But there is a case that current visible value is different with previous visible, when clipper object is same. I added this patch to cover above case to draw childern of map. See following flow. evas_render_mapped > if (_evas_render_has_map(obj) && !_evas_render_can_map(obj)) > if (!changed) changed = evas_object_smart_changed_get(obj); The evas_object_smart_changed_get returned FALSE, even though current visible value is different with previous one in the same clipper object. Reviewers: raster, Hermet, herb, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12250 --- src/lib/evas/canvas/evas_object_smart.c | 27 +++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 012a7f4374..a9e654bdcb 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1377,12 +1377,27 @@ evas_object_smart_changed_get(Evas_Object_Protected_Data *obj) return EINA_FALSE; //b. Object clipper visibility - if ((obj->prev->clipper && obj->cur->clipper) && - ((!obj->prev->clipper->cur->visible && - !obj->cur->clipper->cur->visible) || - ((obj->prev->clipper->cur->color.a == 0) && - (obj->cur->clipper->cur->color.a == 0)))) - return EINA_FALSE; + if (obj->prev->clipper && obj->cur->clipper) + { + if (obj->prev->clipper != obj->cur->clipper) + { + /* check between prev clipper and current clipper */ + if ((!obj->prev->clipper->cur->visible && + !obj->cur->clipper->cur->visible) || + ((obj->prev->clipper->cur->color.a == 0) && + (obj->cur->clipper->cur->color.a == 0))) + return EINA_FALSE; + } + else + { + /* check between prev value and current value of clipper */ + if ((!obj->cur->clipper->prev->visible && + !obj->cur->clipper->cur->visible) || + ((obj->cur->clipper->prev->color.a == 0) && + (obj->cur->clipper->cur->color.a == 0))) + return EINA_FALSE; + } + } if (!obj->clip.clipees) {