actor: Annotate the allocation-changed signal
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 5 Mar 2012 10:36:03 +0000 (10:36 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 5 Mar 2012 10:36:03 +0000 (10:36 +0000)
The ActorBox passed to the ::allocation-changed signal should be
annotated as STATIC_SCOPE, given that it's a pointer to a structure
inside ClutterActorPrivate - hence there's no risk of it actually being
freed from a signal handler. This allows the GSignal machinery to avoid
a costly copy/free for each signal emission.

clutter/clutter-actor.c

index 3dd40c1..f84d7cf 100644 (file)
@@ -6444,7 +6444,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
                   NULL, NULL,
                   _clutter_marshal_VOID__BOXED_FLAGS,
                   G_TYPE_NONE, 2,
-                  CLUTTER_TYPE_ACTOR_BOX,
+                  CLUTTER_TYPE_ACTOR_BOX | G_SIGNAL_TYPE_STATIC_SCOPE,
                   CLUTTER_TYPE_ALLOCATION_FLAGS);
 }