glyph cache: Add debug output

Show the size of data uploaded per glyph.
This commit is contained in:
Matthias Clasen 2023-07-01 22:31:28 -04:00
parent 69cf0a75c5
commit 3e9c47e6f7

View 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,