bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a73904ba66226c2b4cdcd606e04c58e4ed2539c1

commit a73904ba66226c2b4cdcd606e04c58e4ed2539c1
Author: Marcel Hollerbach <[email protected]>
Date:   Thu Nov 22 15:47:52 2018 +0100

    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
---
 src/lib/elementary/elm_interface_scrollable.c | 12 +++++++++++-
 src/lib/elementary/elm_interface_scrollable.h |  1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

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
 _elm_pan_update(Elm_Pan_Smart_Data *psd)
 {
    if (psd->content)
-     evas_object_move(psd->content, psd->x - psd->px, psd->y - psd->py);
+     {
+        Efl_Ui_Focus_Manager *manager;
+
+        manager = psd->interface_object;
+
+        efl_ui_focus_manager_dirty_logic_freeze(manager);
+        evas_object_move(psd->content, psd->x - psd->px, psd->y - psd->py);
+        efl_ui_focus_manager_dirty_logic_unfreeze(manager);
+     }
 }
 
 EOLIAN static void
@@ -4188,6 +4196,8 @@ _elm_interface_scrollable_scrollable_content_set(Eo *obj, 
Elm_Scrollable_Smart_I
    if (!sid->pan_obj)
      {
         o = _elm_pan_add(evas_object_evas_get(obj));
+        ELM_PAN_DATA_GET_OR_RETURN(o, pd);
+        pd->interface_object = obj;
         sid->pan_obj = o;
         efl_event_callback_add
           (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
 {
    Evas_Object                   *self;
    Evas_Object                   *content;
+   Evas_Object                   *interface_object;
    Evas_Coord                     x, y, w, h;
    Evas_Coord                     content_w, content_h, px, py;
 };

-- 


Reply via email to