From 91ab00c759455332e251c7a8f5ca58291ad513b0 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 28 Sep 2021 11:30:13 +0900 Subject: [PATCH] evas: reset change after map direct render There is a flickering issue which is caused by absence of reset. If the source image does not reset, then it remains in pending objects array at the end of evas_render_updates_internal, and it keeps the 'obj->changed' as TRUE for next frame. And it makes its parent 'changed' value TRUE as well. But after handling pending objects array, we are handling render objects array. The parent 'changed' value is set to FALSE. As a result, the parent object does not draw on the next frame, and its children including the source image neither. (no push to restack objects array, render_pre, output_redraws_rect_add) Even though there is a change on the source image for the next frame, (for example, evas_object_color_set) it cannot makes the parent object 'changed' value TRUE, (see the logic of evas_object_change) because the source image 'changed' is already TRUE by the logic handling pending objects array on the previous frame. We are calling evas_object_change_reset after evas_render_mapped. So, same logic should exist for the map direct render. *tizen_fix Change-Id: If8b57a8f423e25f0c1f91a90dc30ac1f2c8b4972 --- src/lib/evas/canvas/evas_render.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index fb60aad..63b03a6 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1831,6 +1831,7 @@ static void _map_direct_render(Evas_Public_Data *evas, void *ctx, Evas_Object *src_img, int w, int h, Evas_Object_Protected_Data *obj, void *output, void *surface, int off_x, int off_y, + Evas_Proxy_Render_Data *proxy_render_data, Eina_Bool do_async) { int i; @@ -1882,6 +1883,14 @@ _map_direct_render(Evas_Public_Data *evas, void *ctx, Evas_Object *src_img, } src_img_pd->map = tmap; + + /* We aren't sure this object will be rendered by + normal(not proxy) drawing after, we reset this + only in case of normal drawing. For optmizing, + push this object in an array then reset them + in the end of the rendering.*/ + if (!proxy_render_data) + evas_object_change_reset(src_img_pd); } // @@ -2273,7 +2282,8 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, { _map_direct_render(evas, ctx, direct_render_src_img, src_img_w, src_img_h, obj, output, - surface, off_x, off_y, do_async); + surface, off_x, off_y, + proxy_render_data, do_async); } else { -- 2.7.4