Page MenuHomePhabricator

elm_transit: remove unnecessary image preload invocation
ClosedPublic

Authored by kimcinoo on Feb 17 2020, 12:25 AM.

Details

Summary

If user uses image object with following step, then unnecessary preloading
related line is invocated in elm_image_file_set.

elm_image_file_set(obj, file, NULL)
elm_icon_preload_disabled_set(obj, EINA_TRUE)

The following is the preloading related line triggered by elm_image_file_set.

(#0) _image_preload_internal
(#1) _evas_image_load_async_start
(#2) evas_object_image_preload
(#3) _efl_ui_image_smart_internal_file_set
(#4) _efl_ui_image_efl_file_load
(#5) efl_file_load
(#6) efl_file_simple_load
(#7) elm_image_file_set

Moreover there is a flickering issue caused by the unnecessary preloading.
A test code is attached.

Test Plan

Use following test code. The flickering issue occurs with ELM_SCALE=10 ELM_ACCEL=gl ./test_transit

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.Feb 17 2020, 12:25 AM
kimcinoo requested review of this revision.Feb 17 2020, 12:25 AM
kimcinoo edited the test plan for this revision. (Show Details)Feb 17 2020, 12:29 AM
kimcinoo edited the summary of this revision. (Show Details)Feb 17 2020, 12:31 AM
jsuya accepted this revision.Feb 17 2020, 1:10 AM
This revision is now accepted and ready to land.Feb 17 2020, 1:10 AM
Hermet requested changes to this revision.Feb 17 2020, 1:54 AM

This transit needs to disable preloading.
Does this patch disable it properly?

This revision now requires changes to proceed.Feb 17 2020, 1:54 AM
kimcinoo added a comment.EditedFeb 17 2020, 3:52 AM

Does this patch disable it properly?

Yes. Without this patch, the elm_image_file_set works for prelaod internally.
Following is the stack.

(#0) _image_preload_internal
(#1) _evas_image_load_async_start
(#2) evas_object_image_preload
(#3) _efl_ui_image_smart_internal_file_set
(#4) _efl_ui_image_efl_file_load
(#5) efl_file_load
(#6) efl_file_simple_load
(#7) elm_image_file_set

means that without this patch, transit was not disable preload properly.

Hermet accepted this revision.Feb 17 2020, 4:29 AM
This revision is now accepted and ready to land.Feb 17 2020, 4:29 AM
This revision was automatically updated to reflect the committed changes.