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:33:48 +02:00
parent 3d646804d1
commit 74ab8c3bda
2 changed files with 21 additions and 4 deletions

View File

@ -1025,8 +1025,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 GQuark quark_actor_layout_info = 0;
static GQuark quark_actor_transform_info = 0;
static GQuark quark_actor_animation_info = 0;
@ -17950,13 +17948,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;

View File

@ -730,6 +730,13 @@ void clutter_actor_remove_transition
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__ */