diff --git a/docs/reference/gtk/running.md b/docs/reference/gtk/running.md index 3ddae2cc36..91d72a96b9 100644 --- a/docs/reference/gtk/running.md +++ b/docs/reference/gtk/running.md @@ -290,8 +290,8 @@ are only available when GTK has been configured with `-Ddebug=true`. `fallback` : Information about fallback usage in renderers -`glyphcache` -: Information about glyph caching +`cache` +: Information about caching `verbose` : Print verbose output while rendering diff --git a/gsk/gl/gskglglyphlibrary.c b/gsk/gl/gskglglyphlibrary.c index b35a06f049..ef26de9876 100644 --- a/gsk/gl/gskglglyphlibrary.c +++ b/gsk/gl/gskglglyphlibrary.c @@ -408,7 +408,7 @@ gsk_gl_glyph_library_add (GskGLGlyphLibrary *self, width = (int) ceil (ink_rect.width * key->scale / 1024.0); height = (int) ceil (ink_rect.height * key->scale / 1024.0); - GSK_DEBUG (GLYPH_CACHE, "font %p glyph %u: %u x %u pixels", key->font, key->glyph, width, height); + GSK_DEBUG (CACHE, "font %p glyph %u: %u x %u pixels", key->font, key->glyph, width, height); value = gsk_gl_texture_library_pack (tl, key, diff --git a/gsk/gl/gskgltexturelibrary.c b/gsk/gl/gskgltexturelibrary.c index c27fcf5fd7..772b382477 100644 --- a/gsk/gl/gskgltexturelibrary.c +++ b/gsk/gl/gskgltexturelibrary.c @@ -74,7 +74,7 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self, if (gsk_gl_texture_atlas_get_unused_ratio (atlas) > MAX_OLD_RATIO) { - GSK_DEBUG (GLYPH_CACHE, + GSK_DEBUG (CACHE, "Dropping atlas %d (%g.2%% old)", i, 100.0 * gsk_gl_texture_atlas_get_unused_ratio (atlas)); if (removed == NULL) @@ -122,10 +122,10 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self, } } - GSK_DEBUG (GLYPH_CACHE, "%s: Dropped %d individual items", + GSK_DEBUG (CACHE, "%s: Dropped %d individual items", G_OBJECT_TYPE_NAME (self), dropped); - GSK_DEBUG (GLYPH_CACHE, "%s: %d items cached (%d atlased, %d individually)", + GSK_DEBUG (CACHE, "%s: %d items cached (%d atlased, %d individually)", G_OBJECT_TYPE_NAME (self), g_hash_table_size (self->hash_table), atlased, @@ -139,7 +139,7 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self, g_clear_pointer (&removed, g_ptr_array_unref); } - if (GSK_DEBUG_CHECK (GLYPH_CACHE)) + if (GSK_DEBUG_CHECK (CACHE)) { static gint64 last_message; gint64 now = g_get_monotonic_time (); diff --git a/gsk/gpu/gskgpucache.c b/gsk/gpu/gskgpucache.c index 9c06646994..b44610147c 100644 --- a/gsk/gpu/gskgpucache.c +++ b/gsk/gpu/gskgpucache.c @@ -517,7 +517,7 @@ gsk_gpu_cache_gc (GskGpuCache *self, g_atomic_pointer_set (&self->dead_texture_pixels, 0); - if (GSK_DEBUG_CHECK (GLYPH_CACHE)) + if (GSK_DEBUG_CHECK (CACHE)) print_cache_stats (self); gdk_profiler_end_mark (before, "Glyph cache GC", NULL); diff --git a/gsk/gpu/gskgpudevice.c b/gsk/gpu/gskgpudevice.c index cca2fd5be2..602388d15f 100644 --- a/gsk/gpu/gskgpudevice.c +++ b/gsk/gpu/gskgpudevice.c @@ -63,7 +63,7 @@ cache_gc_cb (gpointer data) gint64 timestamp; timestamp = g_get_monotonic_time (); - GSK_DEBUG (GLYPH_CACHE, "Periodic GC (timestamp %lld)", (long long) timestamp); + GSK_DEBUG (CACHE, "Periodic GC (timestamp %lld)", (long long) timestamp); if (gsk_gpu_device_gc (self, timestamp)) { @@ -90,7 +90,7 @@ gsk_gpu_device_maybe_gc (GskGpuDevice *self) if (priv->cache_timeout == 0 || dead_texture_pixels > 1000000) { - GSK_DEBUG (GLYPH_CACHE, "Pre-frame GC (%" G_GSIZE_FORMAT " dead pixels)", dead_texture_pixels); + GSK_DEBUG (CACHE, "Pre-frame GC (%" G_GSIZE_FORMAT " dead pixels)", dead_texture_pixels); gsk_gpu_device_gc (self, g_get_monotonic_time ()); } } @@ -168,7 +168,7 @@ gsk_gpu_device_setup (GskGpuDevice *self, } } - if (GSK_DEBUG_CHECK (GLYPH_CACHE)) + if (GSK_DEBUG_CHECK (CACHE)) { if (priv->cache_timeout < 0) gdk_debug_message ("Cache GC disabled"); diff --git a/gsk/gskdebug.c b/gsk/gskdebug.c index 5b5cd0143f..8db5090799 100644 --- a/gsk/gskdebug.c +++ b/gsk/gskdebug.c @@ -8,7 +8,7 @@ static const GdkDebugKey gsk_debug_keys[] = { { "vulkan", GSK_DEBUG_VULKAN, "Vulkan renderer information" }, { "shaders", GSK_DEBUG_SHADERS, "Information about shaders" }, { "fallback", GSK_DEBUG_FALLBACK, "Information about fallback usage in renderers" }, - { "glyphcache", GSK_DEBUG_GLYPH_CACHE, "Information about glyph caching" }, + { "cache", GSK_DEBUG_CACHE, "Information about 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" }, diff --git a/gsk/gskdebugprivate.h b/gsk/gskdebugprivate.h index fe0bcba8cc..d7b71c9df5 100644 --- a/gsk/gskdebugprivate.h +++ b/gsk/gskdebugprivate.h @@ -10,7 +10,7 @@ typedef enum { GSK_DEBUG_SHADERS = 1 << 2, GSK_DEBUG_VULKAN = 1 << 3, GSK_DEBUG_FALLBACK = 1 << 4, - GSK_DEBUG_GLYPH_CACHE = 1 << 5, + GSK_DEBUG_CACHE = 1 << 5, GSK_DEBUG_VERBOSE = 1 << 6, /* flags below may affect behavior */ GSK_DEBUG_GEOMETRY = 1 << 7, diff --git a/gtk/inspector/logs.c b/gtk/inspector/logs.c index ad084b36d2..cd2866c0f7 100644 --- a/gtk/inspector/logs.c +++ b/gtk/inspector/logs.c @@ -64,7 +64,7 @@ struct _GtkInspectorLogs GtkWidget *cairo; GtkWidget *vulkan_gsk; GtkWidget *shaders; - GtkWidget *glyphcache; + GtkWidget *cache; GtkWidget *verbose; GtkWidget *actions; @@ -143,7 +143,7 @@ flag_toggled (GtkWidget *button, update_flag (logs->cairo, &flags, GSK_DEBUG_CAIRO); update_flag (logs->vulkan_gsk, &flags, GSK_DEBUG_VULKAN); update_flag (logs->shaders, &flags, GSK_DEBUG_SHADERS); - update_flag (logs->glyphcache, &flags, GSK_DEBUG_GLYPH_CACHE); + update_flag (logs->cache, &flags, GSK_DEBUG_CACHE); update_flag (logs->verbose, &flags, GSK_DEBUG_VERBOSE); gsk_set_debug_flags (flags); @@ -205,7 +205,7 @@ gtk_inspector_logs_class_init (GtkInspectorLogsClass *klass) gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, cairo); 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, glyphcache); + gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, cache); gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, verbose); gtk_widget_class_bind_template_child (widget_class, GtkInspectorLogs, actions); diff --git a/gtk/inspector/logs.ui b/gtk/inspector/logs.ui index d6fd40fb95..432f6a35d9 100644 --- a/gtk/inspector/logs.ui +++ b/gtk/inspector/logs.ui @@ -141,8 +141,8 @@ - - Glyph Cache + + Cache