diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-01-08 19:14:58 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-01-08 19:14:58 +0100 |
commit | 67501e91744a55653c985b088d008d7a54cea1e8 (patch) | |
tree | a92e8d02027ea6b847f075fa2d694dfd6a3053cd /render/glyphcache.c | |
parent | c76a3d84a81c59f880ecac26bf4935e1bb76afc1 (diff) | |
download | mupdf-67501e91744a55653c985b088d008d7a54cea1e8.tar.xz |
ported x11pdf to win32
Diffstat (limited to 'render/glyphcache.c')
-rw-r--r-- | render/glyphcache.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; |