Page MenuHomePhabricator

elm/efl_ui: remove elm_layout_sizing_eval implementations
ClosedPublic

Authored by zmike on Jul 29 2019, 12:17 PM.

Details

Summary

historically there have been two methods of calculating sizes in elm:

  • elm_layout_sizing_eval
  • evas_object_smart_calculate (now efl_canvas_group_calculate)

the former was used to set size hints on widgets, while the latter was
used to perform internal size calcs for the widget. for things to
work correctly, these functions had to be triggered in just the right
order at just the right time. many hard-to-fix bugs related to widget
sizing over the years have been the result of this split

this patch removes elm_layout_sizing_eval implementations so that all
widgets perform both internal size calcs and size hint setting all
in the same function, ensuring that these are always in sync

the result is that in the vast majority of cases, far fewer recalcs
happen for widgets, and they are quicker to achieve their final size

Depends on D9438

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.
zmike created this revision.Jul 29 2019, 12:17 PM

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/

zmike requested review of this revision.Jul 29 2019, 12:17 PM
zmike updated this revision to Diff 23742.Jul 30 2019, 7:02 AM
zmike edited the summary of this revision. (Show Details)

rebase

bu5hm4n requested changes to this revision.Jul 30 2019, 7:39 AM
bu5hm4n added a subscriber: bu5hm4n.

I am not entirly sure when efl_canvas_group_need_recalculate_set(obj, EINA_FALSE) needs to be called... i just commented everywhere where i did not find it. Can you shed some light into the dark here ?

src/lib/elementary/efl_ui_clock.c
508

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_internal_text_scroller.c
66

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_item.c
209

In general: We should speak about that, maybe we want to have item in the minsize of the finger?

src/lib/elementary/efl_ui_layout.c
209

The line above seems to do the same thing?

src/lib/elementary/efl_ui_panel.c
56

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_panes.c
206

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_scroller.c
293

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_text.c
860

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_timepicker.c
202

Not necessarily in this patch, but timepicker consist out of 3 finger-min-size'ed elements, i think we do not need finger min size here at all. (But it also does no harm on the other side ... :) )

src/lib/elementary/efl_ui_video.c
111

I think this needs efl_canvas_group_need_recalculate_set(obj, EINA_FALSE); ?

src/lib/elementary/efl_ui_widget.c
962–964

This should go i guess.

This revision now requires changes to proceed.Jul 30 2019, 7:39 AM
zmike updated this revision to Diff 23750.Jul 30 2019, 9:43 AM

unset need_calc

bu5hm4n accepted this revision.Jul 30 2019, 10:03 AM
This revision is now accepted and ready to land.Jul 30 2019, 10:03 AM
This revision was automatically updated to reflect the committed changes.
jpeg added a subscriber: jpeg.Jul 31 2019, 12:42 AM

This is incredible ?