summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-17 18:06:10 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-21 10:52:39 +0900
commit60dc978857564cb9ee0319810387c5a74936bd84 (patch)
treef20144df59b8c0df3c9d7c788f64dc611e279853 /src/lib
parentec71f6607a2d6dc84f22ecd962c4d862c0924d4d (diff)
evas: Inline checks for post-event cb call
This avoid excessive calls to a real function. @optimization
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c5
-rw-r--r--src/lib/evas/include/evas_private.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index c57682c242..9bc736670b 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -222,14 +222,13 @@ _eo_evas_cb(void *data, const Efl_Event *event)
222} 222}
223 223
224void 224void
225_evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e, int min_event_id) 225_evas_post_event_callback_call_real(Evas *eo_e, Evas_Public_Data *e, int min_event_id)
226{ 226{
227 Evas_Post_Callback *pc; 227 Evas_Post_Callback *pc;
228 Eina_List *l, *l_next; 228 Eina_List *l, *l_next;
229 int skip = 0; 229 int skip = 0;
230 230
231 if (e->delete_me) return; 231 if (e->delete_me) return;
232 if (!e->post_events) return;
233 232
234 _evas_walk(e); 233 _evas_walk(e);
235 e->running_post_events++; 234 e->running_post_events++;
@@ -250,7 +249,7 @@ _evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e, int min_event_id
250 && (e->current_event == EVAS_CALLBACK_LAST)) 249 && (e->current_event == EVAS_CALLBACK_LAST))
251 { 250 {
252 WRN("Not all post-event callbacks have been processed!"); 251 WRN("Not all post-event callbacks have been processed!");
253 _evas_post_event_callback_call(eo_e, e, 0); 252 _evas_post_event_callback_call_real(eo_e, e, 0);
254 } 253 }
255} 254}
256 255
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 7b237c2729..7573acd610 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1686,7 +1686,9 @@ void evas_object_smart_need_bounding_box_update(Evas_Object *eo_obj, Evas_Smart_
1686Eina_Bool evas_object_smart_changed_get(Evas_Object *eo_obj); 1686Eina_Bool evas_object_smart_changed_get(Evas_Object *eo_obj);
1687void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s); 1687void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s);
1688void *evas_mem_calloc(int size); 1688void *evas_mem_calloc(int size);
1689void _evas_post_event_callback_call(Evas *e, Evas_Public_Data* e_pd, int min_event_id); 1689void _evas_post_event_callback_call_real(Evas *e, Evas_Public_Data* e_pd, int min_event_id);
1690#define _evas_post_event_callback_call(e, pd, id) do { \
1691 if (!pd->delete_me && pd->post_events) _evas_post_event_callback_call_real(e, pd, id); } while (0)
1690void _evas_post_event_callback_free(Evas *e); 1692void _evas_post_event_callback_free(Evas *e);
1691void evas_event_callback_list_post_free(Eina_Inlist **list); 1693void evas_event_callback_list_post_free(Eina_Inlist **list);
1692void evas_object_event_callback_all_del(Evas_Object *obj); 1694void evas_object_event_callback_all_del(Evas_Object *obj);