[clutter] clutter-actor: Make clutter_actor_has_mapped_clones public
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] clutter-actor: Make clutter_actor_has_mapped_clones public
- Date: Wed, 17 Jul 2013 10:43:06 +0000 (UTC)
commit 74ab8c3bdad5228f0f606b146b420f7f4df421bd
Author: Adel Gadllah <adel gadllah gmail com>
Date: Wed Jul 17 12:33:48 2013 +0200
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 1ea935a..720e973 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -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;
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index 95364ea..9bebb23 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]