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
This commit is contained in:
Adel Gadllah 2013-07-17 12:41:27 +02:00
parent 0cef63b837
commit 697f7a3359
2 changed files with 21 additions and 4 deletions

View File

@ -1064,8 +1064,6 @@ static void clutter_actor_set_transform_internal (ClutterActor *self,
static void clutter_actor_set_child_transform_internal (ClutterActor *self, static void clutter_actor_set_child_transform_internal (ClutterActor *self,
const ClutterMatrix *transform); 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_realize_internal (ClutterActor *self);
static void clutter_actor_unrealize_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); 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) clutter_actor_has_mapped_clones (ClutterActor *self)
{ {
ClutterActorPrivate *priv = self->priv; ClutterActorPrivate *priv;
GHashTableIter iter; GHashTableIter iter;
gpointer key; gpointer key;
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
priv = self->priv;
if (priv->clones == NULL) if (priv->clones == NULL)
return FALSE; return FALSE;

View File

@ -735,6 +735,13 @@ void clutter_actor_remove_transition
CLUTTER_AVAILABLE_IN_1_10 CLUTTER_AVAILABLE_IN_1_10
void clutter_actor_remove_all_transitions (ClutterActor *self); 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 G_END_DECLS
#endif /* __CLUTTER_ACTOR_H__ */ #endif /* __CLUTTER_ACTOR_H__ */