Force a paint instead of calling clutter_redraw()
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 10 Jun 2009 13:52:53 +0000 (14:52 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 10 Jun 2009 13:52:53 +0000 (14:52 +0100)
We do not need the whole redraw machinery inside
clutter_stage_read_pixels(): instead, we want Clutter to drop everything,
paint and call glReadPixels() with the current buffer.

clutter/clutter-stage.c

index 2627169..7fdb981 100644 (file)
@@ -1372,8 +1372,8 @@ clutter_stage_read_pixels (ClutterStage *stage,
   g_return_val_if_fail (x >= 0 && y >= 0, NULL);
 
   /* Force a redraw of the stage before reading back pixels */
-  clutter_redraw (stage);
   clutter_stage_ensure_current (stage);
+  clutter_actor_paint (CLUTTER_ACTOR (stage));
 
   glGetIntegerv (GL_VIEWPORT, viewport);
   stage_x      = viewport[0];