forked from enlightenment/efl
eo: evalulate special counts earlier
we have these special counts which are > 0 when there is a callback subscribed. THey are currently evalulated in _callback_call. However, we can also skip the entire call from inside eo_base_class as we are having the fields there as well. This way we are skipping the obj pointer lookup and vtable lookup. Differential Revision: https://phab.enlightenment.org/D12079
This commit is contained in:
parent
d34a0321cb
commit
0cb7708c68
|
@ -239,9 +239,9 @@ _efl_invalidate(_Eo_Object *obj)
|
||||||
|
|
||||||
id = _eo_obj_id_get(obj);
|
id = _eo_obj_id_get(obj);
|
||||||
|
|
||||||
efl_event_callback_call(id, EFL_EVENT_INVALIDATE, NULL);
|
|
||||||
|
|
||||||
pd = efl_data_scope_get(id, EFL_OBJECT_CLASS);
|
pd = efl_data_scope_get(id, EFL_OBJECT_CLASS);
|
||||||
|
if (pd->event_cb_EFL_EVENT_INVALIDATE)
|
||||||
|
efl_event_callback_call(id, EFL_EVENT_INVALIDATE, NULL);
|
||||||
|
|
||||||
efl_invalidate(id);
|
efl_invalidate(id);
|
||||||
|
|
||||||
|
@ -1591,7 +1591,8 @@ _efl_object_event_callback_priority_add(Eo *obj, Efl_Object_Data *pd,
|
||||||
_eo_callbacks_sorted_insert(pd, cb);
|
_eo_callbacks_sorted_insert(pd, cb);
|
||||||
_special_event_count_inc(obj, pd, &(cb->items.item));
|
_special_event_count_inc(obj, pd, &(cb->items.item));
|
||||||
|
|
||||||
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void *)arr);
|
if (pd->event_cb_EFL_EVENT_CALLBACK_ADD)
|
||||||
|
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void *)arr);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
||||||
|
@ -1617,8 +1618,8 @@ _efl_object_event_callback_clean(Eo *obj, Efl_Object_Data *pd,
|
||||||
pd->need_cleaning = EINA_TRUE;
|
pd->need_cleaning = EINA_TRUE;
|
||||||
else
|
else
|
||||||
_eo_callback_remove(obj, pd, cb);
|
_eo_callback_remove(obj, pd, cb);
|
||||||
|
if (pd->event_cb_EFL_EVENT_CALLBACK_DEL)
|
||||||
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_DEL, (void *)array);
|
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_DEL, (void *)array);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
|
@ -1745,7 +1746,8 @@ _efl_object_event_callback_array_priority_add(Eo *obj, Efl_Object_Data *pd,
|
||||||
ev_array[i].priority = 0;
|
ev_array[i].priority = 0;
|
||||||
ev_array[i].func = NULL;
|
ev_array[i].func = NULL;
|
||||||
ev_array[i].user_data = NULL;
|
ev_array[i].user_data = NULL;
|
||||||
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, ev_array);
|
if (pd->event_cb_EFL_EVENT_CALLBACK_ADD)
|
||||||
|
efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, ev_array);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue