hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=117a0ca298d97ce95a031c919f0fa9aa92f651aa

commit 117a0ca298d97ce95a031c919f0fa9aa92f651aa
Author: Shinwoo Kim <[email protected]>
Date:   Wed Aug 8 13:51:40 2018 +0900

    evas_image: do not render while preloading
    
    Summary:
    Unexpected image shows if image data is not ready.
    Even though there is a change to check the 'preloading' in pre_render phase,
    evas_object_image_render is called. So we need to check here as well.
    
    Reference: https://phab.enlightenment.org/D6739
    
    It seems that the 'preloading' is not enough. The 'preloading' could be 
reset
    to FALSE by _evas_image_load_async_cancel > _image_preload_internal.
    
    If the following step happens, then this patch set is neccessary.
    (1) evas_object_image_pre_render
    (2) _evas_iamge_load_async_start
    (3) evas_object_image_render
    
    I could not find out what the correct step, but it actullay happens.
    The evas_object_image_render could be called with the 'preloading' TURE.
    
    Reviewers: Hermet
    
    Reviewed By: Hermet
    
    Subscribers: cedric, #reviewers, #committers, zmike
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D6778
---
 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 c5bdc58184..22c1c7d99c 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1749,6 +1749,9 @@ evas_object_image_render(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj, v
 {
    Evas_Image_Data *o = type_private_data;
 
+   /* image is not ready yet, skip rendering. Leave it to next frame */
+   if (o->preloading) return;
+
    if ((o->cur->fill.w < 1) || (o->cur->fill.h < 1))
      return;  /* no error message, already printed in pre_render */
 

-- 


Reply via email to