From 90e2fadc5bffa47120ac010205b68951d852e67d Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Thu, 21 Feb 2019 06:57:17 +0000 Subject: [PATCH] evas_object_image: render_post returns if preloading. The render_post calls evas_object_change if o->changed is true which is added by commit "36fc2e6 evas image: fix non-rendered preload image.". But an image could lose chance to render. Please refer to the following. (1) 1st render_updates_internal render_post - evas_object_change for image and its parents evas_object_reset - for its parent (2) _evas_image_load_post_update - o->preload is changed to true here (3) 2nd render_updates_internal evas_render_mapped cannot call render The reason of (3) would be unchanged parents. If render_post returns if an image is preloading, then evas_object_change works for the image and its parents at (2). And finally (3) will call render. It would be reasonable because render_pre, and render returns as well. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7973 Change-Id: Ifc84f6733bb7cc6a5e21c9686edba811270d1bab --- src/lib/evas/canvas/evas_object_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 1309da3..5a76452 100755 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -2891,6 +2891,9 @@ evas_object_image_render_post(Evas_Object *eo_obj EINA_UNUSED, Evas_Image_Data *o = type_private_data; Eina_Rectangle *r; + /* image is not ready yet, skip rendering. Leave it to next frame */ + if (o->preload & EVAS_IMAGE_PRELOADING) return; + /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ -- 2.7.4