mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
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:
parent
5d26aeca34
commit
708d385866
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user