[mutter/wip/carlosg/performance-improvements: 5/13] ClutterActor: Call queue_redraw vfunc directly if possible
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/performance-improvements: 5/13] ClutterActor: Call queue_redraw vfunc directly if possible
- Date: Fri, 5 May 2017 13:05:29 +0000 (UTC)
commit d29f4e950e80b647cf17d1803fb54d408a03ae70
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Apr 30 17:00:18 2017 +0200
ClutterActor: Call queue_redraw vfunc directly if possible
Reduces some signal emission overhead.
clutter/clutter/clutter-actor.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index a17666a..42e88b0 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -2657,7 +2657,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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]