glyph cache: Add debug output
authorMatthias Clasen <mclasen@redhat.com>
Sun, 2 Jul 2023 02:31:28 +0000 (22:31 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 28 Jul 2023 06:06:14 +0000 (09:06 +0300)
Show the size of data uploaded per glyph.

gsk/gl/gskglglyphlibrary.c

index 22ffeb0324514e6664ef7b04ada1e33043c43e0f..9b8c78fc3011258e1c7de8449d19295bf52d5c3c 100644 (file)
@@ -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,