diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 8289c0af8..58ec885e0 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -19,6 +19,7 @@ #include "clutter/clutter-frame-clock.h" +#include "clutter/clutter-debug.h" #include "clutter/clutter-main.h" #include "clutter/clutter-private.h" #include "clutter/clutter-timeline-private.h" @@ -307,7 +308,9 @@ clutter_frame_clock_compute_max_render_time_us (ClutterFrameClock *frame_clock) refresh_interval_us = (int64_t) (0.5 + G_USEC_PER_SEC / frame_clock->refresh_rate); - if (!frame_clock->got_measurements_last_frame) + if (!frame_clock->got_measurements_last_frame || + G_UNLIKELY (clutter_paint_debug_flags & + CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME)) return refresh_interval_us - SYNC_DELAY_FALLBACK_US; for (i = 0; i < ESTIMATE_QUEUE_LENGTH; ++i) diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index bbefd62d0..ddde16fad 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -130,6 +130,7 @@ static const GDebugKey clutter_paint_debug_keys[] = { { "continuous-redraw", CLUTTER_DEBUG_CONTINUOUS_REDRAW }, { "paint-deform-tiles", CLUTTER_DEBUG_PAINT_DEFORM_TILES }, { "damage-region", CLUTTER_DEBUG_PAINT_DAMAGE_REGION }, + { "disable-dynamic-max-render-time", CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME }, }; gboolean diff --git a/clutter/clutter/clutter-main.h b/clutter/clutter/clutter-main.h index 74abc29a0..35931bb51 100644 --- a/clutter/clutter/clutter-main.h +++ b/clutter/clutter/clutter-main.h @@ -63,15 +63,16 @@ typedef enum typedef enum { - CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0, - CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1, - 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_CONTINUOUS_REDRAW = 1 << 6, - CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7, - CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8, + CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0, + CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1, + 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_CONTINUOUS_REDRAW = 1 << 6, + CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7, + CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8, + CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME = 1 << 9, } ClutterDrawDebugFlag; /**