actor: Annotate signals to enable some optimization

The ::paint, ::queue-redraw, and ::queue-relayout signals should be
marked as no-recurse and no-hooks; these signals are emitted *a lot*
during each frame, and since GLib has a bunch of optimizations for
signals with no closures, we should try and squeeze every single CPU
cycle we can.
This commit is contained in:
Emmanuele Bassi 2012-03-14 11:33:55 +00:00
parent 5d26aeca34
commit 708d385866

View File

@ -6045,7 +6045,9 @@ clutter_actor_class_init (ClutterActorClass *klass)
actor_signals[QUEUE_REDRAW] =
g_signal_new (I_("queue-redraw"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_SIGNAL_RUN_LAST |
G_SIGNAL_NO_RECURSE |
G_SIGNAL_NO_HOOKS,
G_STRUCT_OFFSET (ClutterActorClass, queue_redraw),
NULL, NULL,
_clutter_marshal_VOID__OBJECT,
@ -6072,7 +6074,9 @@ clutter_actor_class_init (ClutterActorClass *klass)
actor_signals[QUEUE_RELAYOUT] =
g_signal_new (I_("queue-relayout"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_SIGNAL_RUN_LAST |
G_SIGNAL_NO_RECURSE |
G_SIGNAL_NO_HOOKS,
G_STRUCT_OFFSET (ClutterActorClass, queue_relayout),
NULL, NULL,
_clutter_marshal_VOID__VOID,
@ -6359,7 +6363,9 @@ clutter_actor_class_init (ClutterActorClass *klass)
actor_signals[PAINT] =
g_signal_new (I_("paint"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_SIGNAL_RUN_LAST |
G_SIGNAL_NO_RECURSE |
G_SIGNAL_NO_HOOKS,
G_STRUCT_OFFSET (ClutterActorClass, paint),
NULL, NULL,
_clutter_marshal_VOID__VOID,