diff --git a/clutter/clutter-debug.h b/clutter/clutter-debug.h index 75263fd0c..f4a9bf872 100644 --- a/clutter/clutter-debug.h +++ b/clutter/clutter-debug.h @@ -41,7 +41,8 @@ typedef enum { CLUTTER_DEBUG_REDRAWS = 1 << 2, CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3, CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4, - CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5 + CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5, + CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6 } ClutterDrawDebugFlag; #ifdef CLUTTER_ENABLE_DEBUG diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 7a2cdcd6a..105b4ac9e 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -183,7 +183,8 @@ static const GDebugKey clutter_paint_debug_keys[] = { { "redraws", CLUTTER_DEBUG_REDRAWS }, { "paint-volumes", CLUTTER_DEBUG_PAINT_VOLUMES }, { "disable-culling", CLUTTER_DEBUG_DISABLE_CULLING }, - { "disable-offscreen-redirect", CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT } + { "disable-offscreen-redirect", CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT }, + { "continuous-redraw", CLUTTER_DEBUG_CONTINUOUS_REDRAW } }; #ifdef CLUTTER_ENABLE_PROFILE diff --git a/clutter/clutter-master-clock.c b/clutter/clutter-master-clock.c index 1d679243d..ce8d70bc2 100644 --- a/clutter/clutter-master-clock.c +++ b/clutter/clutter-master-clock.c @@ -277,6 +277,20 @@ clutter_clock_prepare (GSource *source, int delay; clutter_threads_enter (); + + if (G_UNLIKELY (clutter_paint_debug_flags & + CLUTTER_DEBUG_CONTINUOUS_REDRAW)) + { + ClutterStageManager *stage_manager = clutter_stage_manager_get_default (); + const GSList *stages, *l; + + stages = clutter_stage_manager_peek_stages (stage_manager); + + /* Queue a full redraw on all of the stages */ + for (l = stages; l != NULL; l = l->next) + clutter_actor_queue_redraw (l->data); + } + delay = master_clock_next_frame_delay (master_clock); clutter_threads_leave ();