Page MenuHomePhabricator

efl_ui_image: fixed elm_image_preload_disabled_set api is not working when it is called before file set
ClosedPublic

Authored by herb on Jun 11 2020, 9:01 PM.

Details

Summary

when elm_image_preload_disabled_set(img, EINA_TRUE) is called before file set.
The image preload is not canceled, because the function will be returned since the image is not loaded.
so preload disabled api is fixed to work even if it is called before file set.
@fix

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.
herb created this revision.Jun 11 2020, 9:01 PM
herb requested review of this revision.Jun 11 2020, 9:01 PM
Hermet requested changes to this revision.Jun 11 2020, 11:55 PM

Please check comments.

src/lib/elementary/efl_ui_image.c
2566

I think it only needs this addition.

if (!sd->img)
{

if (disable) sd->preload_stauts = DISABLE;
return;

}

2571

without img, PRELOADING status is impossible.

2580

without img, PRELOADING status is impossible.

This revision now requires changes to proceed.Jun 11 2020, 11:55 PM
herb updated this revision to Diff 30623.Jun 11 2020, 11:57 PM

update source code

herb updated this revision to Diff 30624.Jun 12 2020, 12:01 AM

update source code

herb updated this revision to Diff 30625.Jun 12 2020, 12:11 AM

update codes

Hermet accepted this revision.Jun 12 2020, 12:14 AM
This revision is now accepted and ready to land.Jun 12 2020, 12:14 AM
This revision was automatically updated to reflect the committed changes.