gdk: Add a debug flag for subsurfaces

You can now use GDK_DEBUG=offload to get debug spew about
subsurfaces and graphics offload.
This commit is contained in:
Matthias Clasen 2023-10-28 23:54:33 -04:00
parent 489723916d
commit efe1415429
3 changed files with 22 additions and 17 deletions

View File

@ -206,6 +206,9 @@ are only available when GTK has been configured with `-Ddebug=true`.
`dmabuf` `dmabuf`
: Information about dmabuf handling (Linux-only) : Information about dmabuf handling (Linux-only)
`offload`
: Information about subsurfaces and graphics offload (Wayland-only)
A number of options affect behavior instead of logging: A number of options affect behavior instead of logging:
`nograbs` `nograbs`

View File

@ -118,6 +118,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
{ "selection", GDK_DEBUG_SELECTION, "Information about selections" }, { "selection", GDK_DEBUG_SELECTION, "Information about selections" },
{ "clipboard", GDK_DEBUG_CLIPBOARD, "Information about clipboards" }, { "clipboard", GDK_DEBUG_CLIPBOARD, "Information about clipboards" },
{ "dmabuf", GDK_DEBUG_DMABUF, "Information about dmabuf buffers" }, { "dmabuf", GDK_DEBUG_DMABUF, "Information about dmabuf buffers" },
{ "offload", GDK_DEBUG_OFFLOAD, "Information about subsurfaces and graphics offload" },
{ "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)" }, { "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)" },
{ "portals", GDK_DEBUG_PORTALS, "Force use of portals" }, { "portals", GDK_DEBUG_PORTALS, "Force use of portals" },

View File

@ -37,25 +37,26 @@ typedef enum {
GDK_DEBUG_SELECTION = 1 << 9, GDK_DEBUG_SELECTION = 1 << 9,
GDK_DEBUG_CLIPBOARD = 1 << 10, GDK_DEBUG_CLIPBOARD = 1 << 10,
GDK_DEBUG_DMABUF = 1 << 11, GDK_DEBUG_DMABUF = 1 << 11,
GDK_DEBUG_OFFLOAD = 1 << 12,
/* flags below are influencing behavior */ /* flags below are influencing behavior */
GDK_DEBUG_NOGRABS = 1 << 12, GDK_DEBUG_NOGRABS = 1 << 13,
GDK_DEBUG_PORTALS = 1 << 13, GDK_DEBUG_PORTALS = 1 << 14,
GDK_DEBUG_NO_PORTALS = 1 << 14, GDK_DEBUG_NO_PORTALS = 1 << 15,
GDK_DEBUG_GL_DISABLE = 1 << 15, GDK_DEBUG_GL_DISABLE = 1 << 16,
GDK_DEBUG_GL_FRACTIONAL = 1 << 16, GDK_DEBUG_GL_FRACTIONAL = 1 << 17,
GDK_DEBUG_GL_LEGACY = 1 << 17, GDK_DEBUG_GL_LEGACY = 1 << 18,
GDK_DEBUG_GL_GLES = 1 << 18, GDK_DEBUG_GL_GLES = 1 << 19,
GDK_DEBUG_GL_DEBUG = 1 << 19, GDK_DEBUG_GL_DEBUG = 1 << 20,
GDK_DEBUG_GL_EGL = 1 << 20, GDK_DEBUG_GL_EGL = 1 << 21,
GDK_DEBUG_GL_GLX = 1 << 21, GDK_DEBUG_GL_GLX = 1 << 22,
GDK_DEBUG_GL_WGL = 1 << 22, GDK_DEBUG_GL_WGL = 1 << 23,
GDK_DEBUG_VULKAN_DISABLE = 1 << 23, GDK_DEBUG_VULKAN_DISABLE = 1 << 24,
GDK_DEBUG_VULKAN_VALIDATE = 1 << 24, GDK_DEBUG_VULKAN_VALIDATE = 1 << 25,
GDK_DEBUG_DEFAULT_SETTINGS= 1 << 25, GDK_DEBUG_DEFAULT_SETTINGS= 1 << 26,
GDK_DEBUG_HIGH_DEPTH = 1 << 26, GDK_DEBUG_HIGH_DEPTH = 1 << 27,
GDK_DEBUG_NO_VSYNC = 1 << 27, GDK_DEBUG_NO_VSYNC = 1 << 28,
GDK_DEBUG_DMABUF_DISABLE = 1 << 28, GDK_DEBUG_DMABUF_DISABLE = 1 << 29,
} GdkDebugFlags; } GdkDebugFlags;
extern guint _gdk_debug_flags; extern guint _gdk_debug_flags;