[clutter/wip/clutter-1.99: 3/28] 1.99: Remove usage of Shader and Behaviour from ClutterActor
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/clutter-1.99: 3/28] 1.99: Remove usage of Shader and Behaviour from ClutterActor
- Date: Thu, 21 Jun 2012 20:08:19 +0000 (UTC)
commit dd4a422c6393edf61a63a895ecd30ea8a9070c64
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jun 21 16:56:58 2012 +0100
1.99: Remove usage of Shader and Behaviour from ClutterActor
clutter/clutter-actor.c | 96 +----------------------------------------------
1 files changed, 1 insertions(+), 95 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index f2ced60..8638b69 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -625,7 +625,6 @@
#include "clutter-units.h"
#include "deprecated/clutter-actor.h"
-#include "deprecated/clutter-behaviour.h"
#include "deprecated/clutter-container.h"
#define CLUTTER_ACTOR_GET_PRIVATE(obj) \
@@ -1041,7 +1040,6 @@ static inline void clutter_actor_queue_compute_expand (ClutterActor *self);
{ _transform; } \
cogl_matrix_translate ((m), -_tx, -_ty, -_tz); } G_STMT_END
-static GQuark quark_shader_data = 0;
static GQuark quark_actor_layout_info = 0;
static GQuark quark_actor_transform_info = 0;
static GQuark quark_actor_animation_info = 0;
@@ -3305,12 +3303,6 @@ _clutter_actor_update_last_paint_volume (ClutterActor *self)
priv->last_paint_volume_valid = TRUE;
}
-static inline gboolean
-actor_has_shader_data (ClutterActor *self)
-{
- return g_object_get_qdata (G_OBJECT (self), quark_shader_data) != NULL;
-}
-
guint32
_clutter_actor_get_pick_id (ClutterActor *self)
{
@@ -3523,7 +3515,6 @@ clutter_actor_paint (ClutterActor *self)
ClutterActorPrivate *priv;
ClutterPickMode pick_mode;
gboolean clip_set = FALSE;
- gboolean shader_applied = FALSE;
CLUTTER_STATIC_COUNTER (actor_paint_counter,
"Actor real-paint counter",
@@ -3701,25 +3692,13 @@ clutter_actor_paint (ClutterActor *self)
}
if (priv->effects == NULL)
- {
- if (pick_mode == CLUTTER_PICK_NONE &&
- actor_has_shader_data (self))
- {
- _clutter_actor_shader_pre_paint (self, FALSE);
- shader_applied = TRUE;
- }
-
- priv->next_effect_to_paint = NULL;
- }
+ priv->next_effect_to_paint = NULL;
else
priv->next_effect_to_paint =
_clutter_meta_group_peek_metas (priv->effects);
clutter_actor_continue_paint (self);
- if (shader_applied)
- _clutter_actor_shader_post_paint (self);
-
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES &&
pick_mode == CLUTTER_PICK_NONE))
_clutter_actor_draw_paint_volume (self);
@@ -5597,7 +5576,6 @@ clutter_actor_class_init (ClutterActorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- quark_shader_data = g_quark_from_static_string ("-clutter-actor-shader-data");
quark_actor_layout_info = g_quark_from_static_string ("-clutter-actor-layout-info");
quark_actor_transform_info = g_quark_from_static_string ("-clutter-actor-transform-info");
quark_actor_animation_info = g_quark_from_static_string ("-clutter-actor-animation-info");
@@ -13117,40 +13095,6 @@ parse_actor_metas (ClutterScript *script,
return g_slist_reverse (retval);
}
-static GSList *
-parse_behaviours (ClutterScript *script,
- ClutterActor *actor,
- JsonNode *node)
-{
- GList *elements, *l;
- GSList *retval = NULL;
-
- if (!JSON_NODE_HOLDS_ARRAY (node))
- return NULL;
-
- elements = json_array_get_elements (json_node_get_array (node));
-
- for (l = elements; l != NULL; l = l->next)
- {
- JsonNode *element = l->data;
- const gchar *id_ = _clutter_script_get_id_from_node (element);
- GObject *behaviour;
-
- if (id_ == NULL || *id_ == '\0')
- continue;
-
- behaviour = clutter_script_get_object (script, id_);
- if (behaviour == NULL)
- continue;
-
- retval = g_slist_prepend (retval, behaviour);
- }
-
- g_list_free (elements);
-
- return g_slist_reverse (retval);
-}
-
static ClutterMargin *
parse_margin (ClutterActor *self,
JsonNode *node)
@@ -13266,24 +13210,6 @@ clutter_actor_parse_custom_node (ClutterScriptable *scriptable,
else
g_slice_free (RotationInfo, info);
}
- else if (strcmp (name, "behaviours") == 0)
- {
- GSList *l;
-
-#ifdef CLUTTER_ENABLE_DEBUG
- if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
- _clutter_diagnostic_message ("The 'behaviours' key is deprecated "
- "and it should not be used in newly "
- "written ClutterScript definitions.");
-#endif
-
- l = parse_behaviours (script, actor, node);
-
- g_value_init (value, G_TYPE_POINTER);
- g_value_set_pointer (value, l);
-
- retval = TRUE;
- }
else if (strcmp (name, "actions") == 0 ||
strcmp (name, "constraints") == 0 ||
strcmp (name, "effects") == 0)
@@ -13354,26 +13280,6 @@ clutter_actor_set_custom_property (ClutterScriptable *scriptable,
return;
}
- if (strcmp (name, "behaviours") == 0)
- {
- GSList *behaviours, *l;
-
- if (!G_VALUE_HOLDS (value, G_TYPE_POINTER))
- return;
-
- behaviours = g_value_get_pointer (value);
- for (l = behaviours; l != NULL; l = l->next)
- {
- ClutterBehaviour *behaviour = l->data;
-
- clutter_behaviour_apply (behaviour, actor);
- }
-
- g_slist_free (behaviours);
-
- return;
- }
-
if (strcmp (name, "actions") == 0 ||
strcmp (name, "constraints") == 0 ||
strcmp (name, "effects") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]