mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
Merge branch 'debug-cleanup' into 'main'
gsk: Fix a typo See merge request GNOME/gtk!7039
This commit is contained in:
commit
1cbdf88b0f
@ -278,14 +278,11 @@ are only available when GTK has been configured with `-Ddebug=true`.
|
||||
: OpenGL renderer information
|
||||
|
||||
`vulkan`
|
||||
: Vulkan renderer information
|
||||
: Check Vulkan errors
|
||||
|
||||
`shaders`
|
||||
: Information about shaders
|
||||
|
||||
`surface`
|
||||
: Information about surfaces
|
||||
|
||||
`fallback`
|
||||
: Information about fallback usage in renderers
|
||||
|
||||
@ -303,9 +300,6 @@ A number of options affect behavior instead of logging:
|
||||
`full-redraw`
|
||||
: Force full redraws
|
||||
|
||||
`sync`
|
||||
: Sync after each frame
|
||||
|
||||
`staging`
|
||||
: Use a staging image for texture upload (Vulkan only)
|
||||
|
||||
|
@ -488,12 +488,14 @@ gsk_gl_command_queue_new (GdkGLContext *context,
|
||||
int max_texture_size = atoi (g_getenv ("GSK_MAX_TEXTURE_SIZE"));
|
||||
if (max_texture_size == 0)
|
||||
{
|
||||
g_warning ("Failed to parse GSK_MAX_TEXTURE_SIZE");
|
||||
g_warning ("Failed to parse %s", "GSK_MAX_TEXTURE_SIZE");
|
||||
}
|
||||
else
|
||||
{
|
||||
max_texture_size = MAX (max_texture_size, 512);
|
||||
GSK_DEBUG(OPENGL, "Limiting max texture size to %d", max_texture_size);
|
||||
GSK_DEBUG (RENDERER,
|
||||
"Limiting texture size in the GL renderer to %d (via %s)",
|
||||
max_texture_size, "GSK_MAX_TEXTURE_SIZE");
|
||||
self->max_texture_size = MIN (self->max_texture_size, max_texture_size);
|
||||
}
|
||||
}
|
||||
|
@ -5,16 +5,13 @@
|
||||
|
||||
static const GdkDebugKey gsk_debug_keys[] = {
|
||||
{ "renderer", GSK_DEBUG_RENDERER, "General renderer information" },
|
||||
{ "opengl", GSK_DEBUG_OPENGL, "OpenGL renderer information" },
|
||||
{ "vulkan", GSK_DEBUG_VULKAN, "Vulkan renderer information" },
|
||||
{ "shaders", GSK_DEBUG_SHADERS, "Information about shaders" },
|
||||
{ "surface", GSK_DEBUG_SURFACE, "Information about surfaces" },
|
||||
{ "fallback", GSK_DEBUG_FALLBACK, "Information about fallback usage in renderers" },
|
||||
{ "glyphcache", GSK_DEBUG_GLYPH_CACHE, "Information about glyph caching" },
|
||||
{ "verbose", GSK_DEBUG_VERBOSE, "Print verbose output while rendering" },
|
||||
{ "geometry", GSK_DEBUG_GEOMETRY, "Show borders (when using cairo)" },
|
||||
{ "full-redraw", GSK_DEBUG_FULL_REDRAW, "Force full redraws" },
|
||||
{ "sync", GSK_DEBUG_SYNC, "Sync after each frame" },
|
||||
{ "staging", GSK_DEBUG_STAGING, "Use a staging image for texture upload (Vulkan only)" },
|
||||
{ "offload-disable", GSK_DEBUG_OFFLOAD_DISABLE, "Disable graphics offload" },
|
||||
{ "cairo", GSK_DEBUG_CAIRO, "Overlay error pattern over Cairo drawing (finds fallbacks)" },
|
||||
|
@ -7,20 +7,17 @@ G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
GSK_DEBUG_RENDERER = 1 << 0,
|
||||
GSK_DEBUG_OPENGL = 1 << 1,
|
||||
GSK_DEBUG_SHADERS = 1 << 2,
|
||||
GSK_DEBUG_SURFACE = 1 << 3,
|
||||
GSK_DEBUG_VULKAN = 1 << 4,
|
||||
GSK_DEBUG_FALLBACK = 1 << 5,
|
||||
GSK_DEBUG_GLYPH_CACHE = 1 << 6,
|
||||
GSK_DEBUG_VERBOSE = 1 << 7,
|
||||
GSK_DEBUG_VULKAN = 1 << 3,
|
||||
GSK_DEBUG_FALLBACK = 1 << 4,
|
||||
GSK_DEBUG_GLYPH_CACHE = 1 << 5,
|
||||
GSK_DEBUG_VERBOSE = 1 << 6,
|
||||
/* flags below may affect behavior */
|
||||
GSK_DEBUG_GEOMETRY = 1 << 8,
|
||||
GSK_DEBUG_FULL_REDRAW = 1 << 9,
|
||||
GSK_DEBUG_SYNC = 1 << 10,
|
||||
GSK_DEBUG_STAGING = 1 << 11,
|
||||
GSK_DEBUG_OFFLOAD_DISABLE = 1 << 12,
|
||||
GSK_DEBUG_CAIRO = 1 << 13,
|
||||
GSK_DEBUG_GEOMETRY = 1 << 7,
|
||||
GSK_DEBUG_FULL_REDRAW = 1 << 8,
|
||||
GSK_DEBUG_STAGING = 1 << 10,
|
||||
GSK_DEBUG_OFFLOAD_DISABLE = 1 << 11,
|
||||
GSK_DEBUG_CAIRO = 1 << 12,
|
||||
} GskDebugFlags;
|
||||
|
||||
#define GSK_DEBUG_ANY ((1 << 13) - 1)
|
||||
|
@ -62,10 +62,8 @@ struct _GtkInspectorLogs
|
||||
|
||||
GtkWidget *renderer;
|
||||
GtkWidget *cairo;
|
||||
GtkWidget *opengl_gsk;
|
||||
GtkWidget *vulkan_gsk;
|
||||
GtkWidget *shaders;
|
||||
GtkWidget *surface;
|
||||
GtkWidget *glyphcache;
|
||||
GtkWidget *verbose;
|
||||
|
||||
@ -143,10 +141,8 @@ flag_toggled (GtkWidget *button,
|
||||
flags = gsk_get_debug_flags ();
|
||||
update_flag (logs->renderer, &flags, GSK_DEBUG_RENDERER);
|
||||
update_flag (logs->cairo, &flags, GSK_DEBUG_CAIRO);
|
||||
update_flag (logs->opengl_gsk, &flags, GSK_DEBUG_OPENGL);
|
||||
update_flag (logs->vulkan_gsk, &flags, GSK_DEBUG_VULKAN);
|
||||
update_flag (logs->shaders, &flags, GSK_DEBUG_SHADERS);
|
||||
update_flag (logs->surface, &flags, GSK_DEBUG_SURFACE);
|
||||
update_flag (logs->glyphcache, &flags, GSK_DEBUG_GLYPH_CACHE);
|
||||
update_flag (logs->verbose, &flags, GSK_DEBUG_VERBOSE);
|
||||
gsk_set_debug_flags (flags);
|
||||
@ -207,10 +203,8 @@ gtk_inspector_logs_class_init (GtkInspectorLogsClass *klass)
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, renderer);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, cairo);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, opengl_gsk);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, vulkan_gsk);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, shaders);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, surface);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, glyphcache);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, verbose);
|
||||
|
||||
|
@ -128,12 +128,6 @@
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="opengl_gsk">
|
||||
<property name="label">OpenGL</property>
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="vulkan_gsk">
|
||||
<property name="label">Vulkan</property>
|
||||
@ -146,12 +140,6 @@
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="surface">
|
||||
<property name="label">Surface</property>
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="glyphcache">
|
||||
<property name="label">Glyph Cache</property>
|
||||
|
Loading…
Reference in New Issue
Block a user