efl_ui/box: optimize position_set operations with boxes
authorMike Blumenkrantz <zmike@samsung.com>
Wed, 17 Jul 2019 17:12:23 +0000 (13:12 -0400)
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>
Tue, 23 Jul 2019 05:02:34 +0000 (14:02 +0900)
commit170ddf721ca0b0be60afa12276d163a042d6b4ae
tree9ccc4cd4800b57a395f21acce41386cec4f1cb99
parent8248f0134380909aeedaf63789a9da7a41cc17d6
efl_ui/box: optimize position_set operations with boxes

if a box is moved and no other changes are made to the box or its children,
e.g., if the box is scrolled, then there is no need to loop over the box's
items repeatedly in order to accurately calculate all the item geometries
and positions.

instead, simply apply an offset from the last box calc position to each child
item and handle the position changes more transparently

this yields roughly a 12% perf improvement to the 'efl.ui.scroller simple' test
and brings rendering up to nearly 60fps

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9342
src/lib/elementary/efl_ui_box.c
src/lib/elementary/efl_ui_box_layout.c
src/lib/elementary/efl_ui_box_private.h