forked from enlightenment/efl
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
This commit is contained in:
parent
9a37508f62
commit
5b8a1f4a78
|
@ -1142,6 +1142,10 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
|
|||
{
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
||||
|
||||
has_alpha = !!has_alpha;
|
||||
if (has_alpha == o->cur->has_alpha)
|
||||
return;
|
||||
|
||||
evas_object_async_block(obj);
|
||||
if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data))
|
||||
{
|
||||
|
@ -1149,10 +1153,6 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data
|
|||
ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE);
|
||||
}
|
||||
|
||||
has_alpha = !!has_alpha;
|
||||
if (has_alpha == o->cur->has_alpha)
|
||||
return;
|
||||
|
||||
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
|
||||
{
|
||||
state_write->has_alpha = has_alpha;
|
||||
|
|
Loading…
Reference in New Issue