From 3e9c47e6f7114a32d0b32e1614b87dcb8cf97fff Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 1 Jul 2023 22:31:28 -0400 Subject: [PATCH] glyph cache: Add debug output Show the size of data uploaded per glyph. --- gsk/gl/gskglglyphlibrary.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsk/gl/gskglglyphlibrary.c b/gsk/gl/gskglglyphlibrary.c index 22ffeb0324..9b8c78fc30 100644 --- a/gsk/gl/gskglglyphlibrary.c +++ b/gsk/gl/gskglglyphlibrary.c @@ -28,6 +28,8 @@ #include "gskgldriverprivate.h" #include "gskglglyphlibraryprivate.h" +#include "gskdebugprivate.h" + #define MAX_GLYPH_SIZE 128 G_DEFINE_TYPE (GskGLGlyphLibrary, gsk_gl_glyph_library, GSK_TYPE_GL_TEXTURE_LIBRARY) @@ -407,6 +409,8 @@ 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); + value = gsk_gl_texture_library_pack (tl, key, sizeof *value,