clutter-actor: Free the paint volume when queue a clip redraw
authorNeil Roberts <neil@linux.intel.com>
Wed, 16 Feb 2011 18:42:33 +0000 (18:42 +0000)
committerNeil Roberts <neil@linux.intel.com>
Wed, 16 Feb 2011 19:00:05 +0000 (19:00 +0000)
In _clutter_actor_queue_redraw_with_clip it has a local variable to
mark when a new paint volume for the clip is created so that it can be
freed when the function returns. However the actual code to free the
paint volume went missing in 3b789490d2c so the variable did
nothing. This patch just adds the free back in.

clutter/clutter-actor.c

index 272778b..1d5eccc 100644 (file)
@@ -5251,13 +5251,15 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor       *self,
 
   /* Ignore queuing a redraw for actors not descended from a stage */
   stage = _clutter_actor_get_stage_internal (self);
-  if (stage == NULL)
-    return;
 
-  _clutter_stage_queue_actor_redraw (CLUTTER_STAGE (stage),
-                                     self->priv->queue_redraw_entry,
-                                     self,
-                                     pv);
+  if (stage != NULL)
+    _clutter_stage_queue_actor_redraw (CLUTTER_STAGE (stage),
+                                       self->priv->queue_redraw_entry,
+                                       self,
+                                       pv);
+
+  if (should_free_pv)
+    clutter_paint_volume_free (pv);
 }
 
 static void