clutter: Add a CLUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING flag

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441>
This commit is contained in:
Daniel van Vugt 2025-01-16 16:35:08 +08:00 committed by Marge Bot
parent f06913a2d1
commit 9a39a0cee9
3 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,7 @@ static const GDebugKey clutter_paint_debug_keys[] = {
{ "damage-region", CLUTTER_DEBUG_PAINT_DAMAGE_REGION },
{ "disable-dynamic-max-render-time", CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME },
{ "max-render-time", CLUTTER_DEBUG_PAINT_MAX_RENDER_TIME },
{ "disable-triple-buffering", CLUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING },
};
typedef struct _ClutterContextPrivate

View File

@ -981,6 +981,10 @@ clutter_frame_clock_uninhibit (ClutterFrameClock *frame_clock)
static gboolean
want_triple_buffering (ClutterFrameClock *frame_clock)
{
if (G_UNLIKELY (clutter_paint_debug_flags &
CLUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING))
return FALSE;
return TRUE;
}

View File

@ -77,6 +77,7 @@ typedef enum
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME = 1 << 9,
CLUTTER_DEBUG_PAINT_MAX_RENDER_TIME = 1 << 10,
CLUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING = 1 << 11,
} ClutterDrawDebugFlag;
/**