Make the Stage redraw cycle part of GTK+
authorEmmanuele Bassi <ebassi@linux.intel.com>
Sun, 8 Feb 2009 23:57:05 +0000 (23:57 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 9 Feb 2009 00:02:35 +0000 (00:02 +0000)
commitdb93c9d9ce3163db2150bebda9962a134571ac33
tree21afa359181c09f3d6b98b8980ed4932a4d6424b
parent5bff448f092fbf9ab89bd725a642c6e45b594932
Make the Stage redraw cycle part of GTK+

Right now, the Stage is redrawn every time it requires, in parallel
to the GTK+ paint cycle. This generates a certain degree of collision,
as the embedding widget might request a redraw while a Stage redraw
is in progress, thus leading to a skipped frame.

The embedding toolkit should "drive" the Clutter paint cycle, instead.

The ClutterStage::queue-redraw signal was added exactly for this use
case. The GtkClutterEmbed widget should intercept every queued redraw
of the embedded stage, stop it and queue a redraw on the widget itself,
thus making it play along with the rest of the GTK+ paint cycle
machinery. The stage is only painted after the widget receives an
expose event, ensuring that the Clutter scenegraph is repainted only
when needed.
clutter-gtk/gtk-clutter-embed.c