From 5ffbe052480cb06e44f1a317ac729553ddd2dc96 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 24 Jun 2009 18:20:45 +0100 Subject: [PATCH] Revert "[actor] Avoid modifying materials mid-scene to improve journal batching" This reverts commit 85243da382025bd516937c76a61b8381f6e74689. Since the journal puts material colors in the vertex array accumulated for drawing we don't need to flush the journal simply due to color changes which means using cogl_set_source_color4ub is no longer a concern. --- clutter/clutter-actor.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 76c574a20..7f8b1e997 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -332,8 +332,6 @@ struct _ClutterActorPrivate PangoContext *pango_context; ClutterActor *opacity_parent; - - CoglHandle pick_material; }; enum @@ -1376,13 +1374,11 @@ clutter_actor_real_pick (ClutterActor *self, width = box.x2 - box.x1; height = box.y2 - box.y1; - cogl_material_set_color4ub (self->priv->pick_material, - color->red, - color->green, - color->blue, - color->alpha); + cogl_set_source_color4ub (color->red, + color->green, + color->blue, + color->alpha); - cogl_set_source (self->priv->pick_material); cogl_rectangle (0, 0, width, height); } } @@ -4258,8 +4254,6 @@ clutter_actor_init (ClutterActor *self) priv->opacity_parent = NULL; priv->enable_model_view_transform = TRUE; - priv->pick_material = cogl_material_new (); - memset (priv->clip, 0, sizeof (gfloat) * 4); }