eo: remove function efl_noref that duplicate EFL_EVENT_NOREF.
efl_noref is unused, but will still trigger the full eo call for nothing. This was the most expensive NOOP. EFL_EVENT_NOREF does the same thing and we can even filter generating that call as we know when someone is listening. So removing the function. Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7742
This commit is contained in:
parent
6dedfddda7
commit
4a25abccd6
|
@ -195,12 +195,6 @@ abstract Efl.Object
|
|||
invalidate {
|
||||
[[Called when parent reference is lost/set to $NULL and switch the state of the object to invalidate.]]
|
||||
}
|
||||
noref {
|
||||
[[Triggered when no reference are keeping the object alive.
|
||||
|
||||
The parent can be the last one keeping an object alive and so $noref can happen before $invalidate
|
||||
as it is only impacted by the ref/unref of the object.]]
|
||||
}
|
||||
name_find @const {
|
||||
[[Find a child object with the given name and return it.
|
||||
|
||||
|
|
|
@ -1928,7 +1928,7 @@ efl_unref(const Eo *obj_id)
|
|||
((obj->user_refcount == 1 && !obj->parent) ||
|
||||
(obj->user_refcount == 2 && obj->parent))))
|
||||
{
|
||||
// We need to report efl_ref_count correctly during efl_noref, so fake it
|
||||
// We need to report efl_ref_count correctly during EFL_EVENT_NOREF, so fake it
|
||||
// by adjusting efl_ref_count while inside efl_unref (This should avoid
|
||||
// infinite loop)
|
||||
obj->unref_compensate = EINA_TRUE;
|
||||
|
@ -1936,7 +1936,6 @@ efl_unref(const Eo *obj_id)
|
|||
// The noref event should happen before any object in the
|
||||
// tree get affected by the change in refcount.
|
||||
efl_event_callback_call((Eo *) obj_id, EFL_EVENT_NOREF, NULL);
|
||||
efl_noref((Eo *) obj_id);
|
||||
|
||||
obj->unref_compensate = EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -189,11 +189,6 @@ _efl_invalidate(_Eo_Object *obj)
|
|||
obj->invalidate = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_object_noref(Eo *obj EINA_UNUSED, Efl_Object_Data *pd EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
_efl_object_extension_free(Efl_Object_Extension *ext)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue