From 67501e91744a55653c985b088d008d7a54cea1e8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 8 Jan 2005 19:14:58 +0100 Subject: ported x11pdf to win32 --- render/glyphcache.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'render/glyphcache.c') diff --git a/render/glyphcache.c b/render/glyphcache.c index 9fd4a5a7..6fc8bd52 100644 --- a/render/glyphcache.c +++ b/render/glyphcache.c @@ -114,6 +114,9 @@ static int hdist = 0; static int coos = 0; static int covf = 0; +static int ghits = 0; +static int gmisses = 0; + static fz_val * hashfind(fz_glyphcache *arena, fz_key *key) { @@ -218,6 +221,7 @@ fz_debugglyphcache(fz_glyphcache *arena) printf("avg dist: %d / %d: %g\n", hdist, hcoll, (double)hdist / hcoll); printf("out-of-space evicts: %d\n", coos); printf("out-of-hash evicts: %d\n", covf); + printf("hits = %d misses = %d ratio = %g\n", ghits, gmisses, (float)ghits / (ghits + gmisses)); /* int i; for (i = 0; i < arena->slots; i++) @@ -333,9 +337,13 @@ fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz bubble(arena, val - arena->lru); + ghits++; + return nil; } + gmisses++; + ctm.e = fz_floor(ctm.e) + key.e / 256.0; ctm.f = fz_floor(ctm.f) + key.f / 256.0; -- cgit v1.2.3