summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-22 15:47:52 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-26 11:37:04 +0100
commita73904ba66226c2b4cdcd606e04c58e4ed2539c1 (patch)
treee8d2d66ba7f1ee53d54dd8d733922923711ee162 /src/lib/elementary
parentac8d16684d0db97183f6eee4c0b430bc3eb179cc (diff)
elm_interface_scrollable: freeze the manager object when content moves
this freezes the manager object of the user of the interface. This improves the overall performance when moving arround focus in a scrollable object, since no new relations are needed to be recalculated. This safes up about 2% in the "Scroller 2" test. Additional optimizations are added in another commit. Differential Revision: https://phab.enlightenment.org/D7349
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c12
-rw-r--r--src/lib/elementary/elm_interface_scrollable.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index d600436a17..df77c8a793 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -95,7 +95,15 @@ static void
95_elm_pan_update(Elm_Pan_Smart_Data *psd) 95_elm_pan_update(Elm_Pan_Smart_Data *psd)
96{ 96{
97 if (psd->content) 97 if (psd->content)
98 evas_object_move(psd->content, psd->x - psd->px, psd->y - psd->py); 98 {
99 Efl_Ui_Focus_Manager *manager;
100
101 manager = psd->interface_object;
102
103 efl_ui_focus_manager_dirty_logic_freeze(manager);
104 evas_object_move(psd->content, psd->x - psd->px, psd->y - psd->py);
105 efl_ui_focus_manager_dirty_logic_unfreeze(manager);
106 }
99} 107}
100 108
101EOLIAN static void 109EOLIAN static void
@@ -4188,6 +4196,8 @@ _elm_interface_scrollable_scrollable_content_set(Eo *obj, Elm_Scrollable_Smart_I
4188 if (!sid->pan_obj) 4196 if (!sid->pan_obj)
4189 { 4197 {
4190 o = _elm_pan_add(evas_object_evas_get(obj)); 4198 o = _elm_pan_add(evas_object_evas_get(obj));
4199 ELM_PAN_DATA_GET_OR_RETURN(o, pd);
4200 pd->interface_object = obj;
4191 sid->pan_obj = o; 4201 sid->pan_obj = o;
4192 efl_event_callback_add 4202 efl_event_callback_add
4193 (o, ELM_PAN_EVENT_CHANGED, _elm_scroll_pan_changed_cb, sid); 4203 (o, ELM_PAN_EVENT_CHANGED, _elm_scroll_pan_changed_cb, sid);
diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h
index 5760c12514..4da12df41e 100644
--- a/src/lib/elementary/elm_interface_scrollable.h
+++ b/src/lib/elementary/elm_interface_scrollable.h
@@ -46,6 +46,7 @@ struct _Elm_Pan_Smart_Data
46{ 46{
47 Evas_Object *self; 47 Evas_Object *self;
48 Evas_Object *content; 48 Evas_Object *content;
49 Evas_Object *interface_object;
49 Evas_Coord x, y, w, h; 50 Evas_Coord x, y, w, h;
50 Evas_Coord content_w, content_h, px, py; 51 Evas_Coord content_w, content_h, px, py;
51}; 52};