From 697f7a335900d35ddff3e57b4d709bb613feef25 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Wed, 17 Jul 2013 12:41:27 +0200 Subject: [PATCH] clutter-actor: Make clutter_actor_has_mapped_clones public This allows some optimisations to be done that work when they are no clones. https://bugzilla.gnome.org/show_bug.cgi?id=703336 --- clutter/clutter-actor.c | 18 ++++++++++++++---- clutter/clutter-actor.h | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index b51a7b755..4775c5668 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -1064,8 +1064,6 @@ static void clutter_actor_set_transform_internal (ClutterActor *self, static void clutter_actor_set_child_transform_internal (ClutterActor *self, const ClutterMatrix *transform); -static inline gboolean clutter_actor_has_mapped_clones (ClutterActor *self); - static void clutter_actor_realize_internal (ClutterActor *self); static void clutter_actor_unrealize_internal (ClutterActor *self); @@ -20341,13 +20339,25 @@ _clutter_actor_queue_relayout_on_clones (ClutterActor *self) clutter_actor_queue_relayout (key); } -static inline gboolean +/** + * clutter_actor_has_mapped_clones: + * @self: a #ClutterActor + * + * Returns whether the actor has any mapped clones. + * + * Since: 1.16 + */ +gboolean clutter_actor_has_mapped_clones (ClutterActor *self) { - ClutterActorPrivate *priv = self->priv; + ClutterActorPrivate *priv; GHashTableIter iter; gpointer key; + g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE); + + priv = self->priv; + if (priv->clones == NULL) return FALSE; diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index 9ba1018ab..bfcb7279a 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -735,6 +735,13 @@ void clutter_actor_remove_transition CLUTTER_AVAILABLE_IN_1_10 void clutter_actor_remove_all_transitions (ClutterActor *self); + +/* Experimental API */ +#ifdef CLUTTER_ENABLE_EXPERIMENTAL_API +CLUTTER_AVAILABLE_IN_1_16 +gboolean clutter_actor_has_mapped_clones (ClutterActor *self); +#endif + G_END_DECLS #endif /* __CLUTTER_ACTOR_H__ */