Page MenuHomePhabricator

elementary image: apply lazy calculation and guarantee retained method.
ClosedPublic

Authored by Hermet on Aug 2 2018, 1:21 AM.

Details

Summary

Image couldn't gurantee retained concept status.
This patch change to setting up image object on the request time,
recovering image status, removing unencessary jobs.

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.
Hermet created this revision.Aug 2 2018, 1:21 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

Hermet requested review of this revision.Aug 2 2018, 1:21 AM
zmike accepted this revision.Aug 2 2018, 6:27 AM

I resolved a minor formatting issue (see above) when landing because I was in a good mood.

src/lib/elementary/efl_ui_image.c
85

nit: variable declaration should be at the top of a given scope.

This revision is now accepted and ready to land.Aug 2 2018, 6:27 AM
zmike added a comment.Aug 2 2018, 6:27 AM

This feels like something that we should have some kind of unit test for, but I'm not entirely sure how it would be written since it would need access to the widget's internal objects...

This revision was automatically updated to reflect the committed changes.

Hi guys,

I have some issue with that patch. What I do in my code is that:

Evas_Object *image = elm_image_add(obj);
Eo *evas_img = elm_image_object_get(image);
evas_object_image_size_set(evas_img, ad->icon.w, ad->icon.h);
evas_object_image_data_set(evas_img, ad->icon.pixels);
evas_object_show(image);
return image;

This is done in the content get of a gengrid. My problem is that evas_img is now NULL. Before, I had access to that.
Is there something wrong with my code?

Thanks

YOhoho added a subscriber: YOhoho.EditedAug 16 2018, 5:50 AM

Hi guys,

I have some issue with that patch. What I do in my code is that:

Evas_Object *image = elm_image_add(obj);
Eo *evas_img = elm_image_object_get(image);
evas_object_image_size_set(evas_img, ad->icon.w, ad->icon.h);
evas_object_image_data_set(evas_img, ad->icon.pixels);
evas_object_show(image);
return image;

This is done in the content get of a gengrid. My problem is that evas_img is now NULL. Before, I had access to that.
Is there something wrong with my code?

Thanks

Please check D6828.
This patch will help your problem :)

bu5hm4n added a subscriber: bu5hm4n.

This is causing T7360. Can you elaborate why size / position setting has to be done in a job ?