aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_callbacks.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-02-01 15:46:50 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-02-02 10:47:25 -0800
commitbdd163fce85202e3cab0d269eda452e3ecd5b7c0 (patch)
tree5dd3b2a6250f34372fc8716d34849f0e912064a8 /src/lib/evas/canvas/evas_callbacks.c
parentevas: no need to call legacy function internally when we can just dereference... (diff)
downloadefl-bdd163fce85202e3cab0d269eda452e3ecd5b7c0.tar.gz
evas: don't emit EVAS_CALLBACK_MOVE event if nobody is listening.
This give a constant improvement of 2% over a total benchmark run while scrolling genlist. This benchmark included setup and destruction of the scene, so under estimate the cost of the callback emit.
Diffstat (limited to 'src/lib/evas/canvas/evas_callbacks.c')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 2d36129f48..321101f69b 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -201,6 +201,11 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
if (!(e = obj->layer->evas)) return;
_evas_walk(e);
+
+ if (type == EVAS_CALLBACK_MOVE &&
+ obj->move_ref == 0)
+ goto nothing_here;
+
{
switch (type)
{
@@ -248,6 +253,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
}
}
+ nothing_here:
if (!obj->no_propagate)
{
if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) &&