ClutterOffscreenEffect: Don't throw away the material for a new actor
authorNeil Roberts <neil@linux.intel.com>
Sat, 27 Nov 2010 16:27:59 +0000 (16:27 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 29 Nov 2010 10:55:52 +0000 (10:55 +0000)
When a new actor is set for ClutterOffscreenEffect it would throw away
the old material. I don't think there is anything specifically tied to
the actor in the material so throwing away just loses Cogl's cached
state about the material. This ends up relinking the shader every time
a new actor is set in ClutterShaderEffect.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2454

clutter/clutter-offscreen-effect.c

index ebfc45d..b6e6900 100644 (file)
@@ -111,12 +111,6 @@ clutter_offscreen_effect_set_actor (ClutterActorMeta *meta,
       priv->offscreen = COGL_INVALID_HANDLE;
     }
 
-  if (priv->target != COGL_INVALID_HANDLE)
-    {
-      cogl_handle_unref (priv->target);
-      priv->target = COGL_INVALID_HANDLE;
-    }
-
   /* we keep a back pointer here, to avoid going through the ActorMeta */
   priv->actor = clutter_actor_meta_get_actor (meta);
 }