diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2018-08-08 13:51:40 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-08-08 13:51:40 +0900 |
commit | 117a0ca298d97ce95a031c919f0fa9aa92f651aa (patch) | |
tree | 186f8ac2cc53b62eef22cdac5cce120b367116ee | |
parent | d4bcd7c8eb11781bc0c572320f557121cbb8f35c (diff) | |
download | efl-117a0ca298d97ce95a031c919f0fa9aa92f651aa.tar.gz |
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
-rw-r--r-- | src/lib/evas/canvas/evas_object_image.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 */ |