mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
gsk: Rename GSK_DEBUG=glyphcache to GSK_DEBUG=cache
1. I mistype it all the time 2. It's shorter 3. We use it for all caching these days, not just glyphs.
This commit is contained in:
parent
ead566b841
commit
d7308f2d73
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 ();
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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" },
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -141,8 +141,8 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="glyphcache">
|
||||
<property name="label">Glyph Cache</property>
|
||||
<object class="GtkCheckButton" id="cache">
|
||||
<property name="label">Cache</property>
|
||||
<signal name="toggled" handler="flag_toggled"/>
|
||||
</object>
|
||||
</child>
|
||||
|
Loading…
Reference in New Issue
Block a user