summaryrefslogtreecommitdiff
path: root/src/lib/evas/gesture/efl_canvas_gesture_manager.c
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-24 11:34:12 -0600
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-25 13:00:43 -0600
commit41a9e1c8737c5167c7974c0f51aa1a531aad4b62 (patch)
treebcc7bdd3120809395c01993c65915e3fd5d472a8 /src/lib/evas/gesture/efl_canvas_gesture_manager.c
parent955c4bd4a0bf4d2167b4d3377ecdf97cd6401740 (diff)
gesture_manager: Use private data getter to save some lookups
We frequently process an array of several events at once, so we can now look up the gesture manager private data once for the entire array. Differential Revision: https://phab.enlightenment.org/D7763 Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Diffstat (limited to '')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 793c0dbf67..cce00dfe19 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -106,9 +106,9 @@ _efl_canvas_gesture_manager_private_data_get(Eo *obj)
106} 106}
107 107
108void 108void
109_efl_canvas_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Event_Description *type) 109_efl_canvas_gesture_manager_callback_add_hook(void *data, Eo *target, const Efl_Event_Description *type)
110{ 110{
111 Efl_Canvas_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS); 111 Efl_Canvas_Gesture_Manager_Data *pd = data;
112 // if there is a recognizer registered for that event then add it to the gesture context 112 // if there is a recognizer registered for that event then add it to the gesture context
113 Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type); 113 Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
114 if (recognizer) 114 if (recognizer)
@@ -119,9 +119,9 @@ _efl_canvas_gesture_manager_callback_add_hook(Eo *obj, Eo *target, const Efl_Eve
119} 119}
120 120
121void 121void
122_efl_canvas_gesture_manager_callback_del_hook(Eo *obj, Eo *target, const Efl_Event_Description *type) 122_efl_canvas_gesture_manager_callback_del_hook(void *data, Eo *target, const Efl_Event_Description *type)
123{ 123{
124 Efl_Canvas_Gesture_Manager_Data *pd = efl_data_scope_get(obj, MY_CLASS); 124 Efl_Canvas_Gesture_Manager_Data *pd = data;
125 // if there is a recognizer registered for that event then add it to the gesture context 125 // if there is a recognizer registered for that event then add it to the gesture context
126 Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type); 126 Efl_Canvas_Gesture_Recognizer *recognizer = eina_hash_find (pd->m_recognizers, &type);
127 if (recognizer) 127 if (recognizer)