{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer", TRUE },
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings", TRUE },
{ "high-depth", GDK_DEBUG_HIGH_DEPTH, "Use high bit depth rendering if possible", TRUE },
+ { "no-vsync", GDK_DEBUG_NO_VSYNC, "Repaint instantly (uses 100% CPU with animations)", TRUE },
};
GDK_DEBUG_VULKAN_VALIDATE = 1 << 23,
GDK_DEBUG_DEFAULT_SETTINGS= 1 << 24,
GDK_DEBUG_HIGH_DEPTH = 1 << 25,
+ GDK_DEBUG_NO_VSYNC = 1 << 26,
} GdkDebugFlags;
extern guint _gdk_debug_flags;
{
GdkFrameClockIdlePrivate *priv = self->priv;
+ if (GDK_DEBUG_CHECK (NO_VSYNC))
+ return FALSE;
+
return priv->freeze_count > 0;
}
{
guint min_interval = 0;
- if (priv->min_next_frame_time != 0)
+ if (priv->min_next_frame_time != 0 &&
+ !GDK_DEBUG_CHECK (NO_VSYNC))
{
gint64 now = g_get_monotonic_time ();
gint64 min_interval_us = MAX (priv->min_next_frame_time, now) - now;
{
g_return_if_fail (GDK_IS_SURFACE (surface));
+ if (GDK_DEBUG_CHECK (NO_VSYNC))
+ return;
+
surface->update_freeze_count++;
if (surface->update_freeze_count == 1)
_gdk_frame_clock_uninhibit_freeze (surface->frame_clock);
{
g_return_if_fail (GDK_IS_SURFACE (surface));
+ if (GDK_DEBUG_CHECK (NO_VSYNC))
+ return;
+
g_return_if_fail (surface->update_freeze_count > 0);
if (--surface->update_freeze_count == 0)