summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2020-05-25 14:48:31 +0900
committerHermet Park <chuneon.park@samsung.com>2020-05-25 14:48:31 +0900
commit104caf05148a79e195179e723e508f21b8664b07 (patch)
tree893a9ee34d0808e2a9e2adfc3d17cee476f515cf
parentbf65520a424799b6348588a7396e79a0f6fe3b82 (diff)
evas image: reload after alpha_set
Summary: The alpha_set cancels preload, and do not try to load it again. So the image is not showing, if the alpha_set is called while preloading. [Sample] Evas_Object *image = elm_image_add(box); elm_box_pack_end(box, image); evas_object_show(image); elm_image_file_set(image, "img.png", NULL); // start preloading Evas_Object *eimg = elm_image_object_get(image); evas_object_image_alpha_set(eimg, EINA_TRUE); // cancel preloading Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11864
-rw-r--r--src/lib/evas/canvas/evas_object_image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 958fabaf00..1e8e32cd94 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1142,6 +1142,10 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
1142{ 1142{
1143 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 1143 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
1144 1144
1145 has_alpha = !!has_alpha;
1146 if (has_alpha == o->cur->has_alpha)
1147 return;
1148
1145 evas_object_async_block(obj); 1149 evas_object_async_block(obj);
1146 if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data)) 1150 if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data))
1147 { 1151 {
@@ -1149,10 +1153,6 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
1149 ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE); 1153 ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE);
1150 } 1154 }
1151 1155
1152 has_alpha = !!has_alpha;
1153 if (has_alpha == o->cur->has_alpha)
1154 return;
1155
1156 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) 1156 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
1157 { 1157 {
1158 state_write->has_alpha = has_alpha; 1158 state_write->has_alpha = has_alpha;