ClutterActor: Call queue_redraw vfunc directly if possible

Reduces some signal emission overhead.

https://bugzilla.gnome.org/show_bug.cgi?id=782344
This commit is contained in:
Carlos Garnacho 2017-04-30 17:00:18 +02:00
parent bc041e02b3
commit d620189ae3

View File

@ -2656,7 +2656,15 @@ _clutter_actor_signal_queue_redraw (ClutterActor *self,
_clutter_actor_queue_redraw_on_clones (self);
/* calls klass->queue_redraw in default handler */
g_signal_emit (self, actor_signals[QUEUE_REDRAW], 0, origin);
if (g_signal_has_handler_pending (self, actor_signals[QUEUE_REDRAW],
0, TRUE))
{
g_signal_emit (self, actor_signals[QUEUE_REDRAW], 0, origin);
}
else
{
CLUTTER_ACTOR_GET_CLASS (self)->queue_redraw (self, origin);
}
}
static void