Page MenuHomePhabricator

evas: break Image_Loader API to allow for getting property from the data field of an image.
ClosedPublic

Authored by cedric on Jun 14 2019, 5:05 PM.

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.
cedric created this revision.Jun 14 2019, 5:05 PM
cedric requested review of this revision.Jun 14 2019, 5:05 PM
zmike added a comment.Jun 17 2019, 9:54 AM

minor readability concerns but nothing that looks like a blocker

src/lib/evas/Evas_Loader.h
137

This could maybe be renamed to info to make the code more readable.

cedric planned changes to this revision.Jun 19 2019, 10:53 AM
cedric updated this revision to Diff 22843.Jun 19 2019, 12:15 PM
cedric retitled this revision from evas: break ImagE_Loader API to allow for getting property from the data field of an image. to evas: break Image_Loader API to allow for getting property from the data field of an image..

Rebase and take comments into account.

cedric updated this revision to Diff 22898.Thu, Jun 20, 5:01 PM

Rebase and rename.

Hermet requested changes to this revision.Tue, Jun 25, 7:45 PM

Please check my comment.

src/lib/evas/Evas_Loader.h
210

Is file_ head_with_data() necessary?
Couldn't file_head_with_data() be replaced with sequencal of file_head() + file_data() calls?

This revision now requires changes to proceed.Tue, Jun 25, 7:45 PM
cedric added inline comments.Wed, Jun 26, 9:39 AM
src/lib/evas/Evas_Loader.h
210

Yes and no. In that case the loader would need additional information to know if it needs to actually process the 9patch information. The current code allow for actually be able to get the row data if necessary without changing the loader. Also this simplify the loader a lot as all the logic of reading the special bit are very much more constrained (if you look at the code of the png loader, you will see that mixing things in the file_data function would increase complexity a lot and reduce the maintainability of the loader. It is complex enough).

Hermet accepted this revision.Mon, Jul 8, 10:52 PM
This revision is now accepted and ready to land.Mon, Jul 8, 10:52 PM
This revision was automatically updated to reflect the committed changes.