Page MenuHomePhabricator

evas image: reload after alpha_set
ClosedPublic

Authored by kimcinoo on Wed, May 20, 9:57 PM.

Details

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

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.Wed, May 20, 9:57 PM
kimcinoo requested review of this revision.Wed, May 20, 9:57 PM
zmike added a subscriber: zmike.Thu, May 21, 7:07 AM

This should probably have a unit test which verifies the load callback is called on the elm_image at some point

kimcinoo updated this revision to Diff 30372.Sun, May 24, 7:04 PM

Remove line which could cause regression.
Do not request preload (image_data_preload_request) as @Hermet requested.

Hermet accepted this revision.Sun, May 24, 10:47 PM

Looks fine.

This revision is now accepted and ready to land.Sun, May 24, 10:47 PM
This revision was automatically updated to reflect the committed changes.