evas: Inline checks for post-event cb call

This avoid excessive calls to a real function.

@optimization
This commit is contained in:
Jean-Philippe Andre 2017-02-17 18:06:10 +09:00
parent ec71f6607a
commit 60dc978857
2 changed files with 5 additions and 4 deletions

View File

@ -222,14 +222,13 @@ _eo_evas_cb(void *data, const Efl_Event *event)
}
void
_evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e, int min_event_id)
_evas_post_event_callback_call_real(Evas *eo_e, Evas_Public_Data *e, int min_event_id)
{
Evas_Post_Callback *pc;
Eina_List *l, *l_next;
int skip = 0;
if (e->delete_me) return;
if (!e->post_events) return;
_evas_walk(e);
e->running_post_events++;
@ -250,7 +249,7 @@ _evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e, int min_event_id
&& (e->current_event == EVAS_CALLBACK_LAST))
{
WRN("Not all post-event callbacks have been processed!");
_evas_post_event_callback_call(eo_e, e, 0);
_evas_post_event_callback_call_real(eo_e, e, 0);
}
}

View File

@ -1686,7 +1686,9 @@ void evas_object_smart_need_bounding_box_update(Evas_Object *eo_obj, Evas_Smart_
Eina_Bool evas_object_smart_changed_get(Evas_Object *eo_obj);
void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s);
void *evas_mem_calloc(int size);
void _evas_post_event_callback_call(Evas *e, Evas_Public_Data* e_pd, int min_event_id);
void _evas_post_event_callback_call_real(Evas *e, Evas_Public_Data* e_pd, int min_event_id);
#define _evas_post_event_callback_call(e, pd, id) do { \
if (!pd->delete_me && pd->post_events) _evas_post_event_callback_call_real(e, pd, id); } while (0)
void _evas_post_event_callback_free(Evas *e);
void evas_event_callback_list_post_free(Eina_Inlist **list);
void evas_object_event_callback_all_del(Evas_Object *obj);