diff options
author | Tor Andersson <tor@ghostscript.com> | 2004-11-25 07:06:56 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2004-11-25 07:06:56 +0100 |
commit | 6796693d6b7db5933aaf5c6a33793abbfd3dd93c (patch) | |
tree | 43d01faf8fba5e36315714d629a2b910d1d7dce6 /render/glyphcache.c | |
parent | 3e799920074ffaa718dfa671f3ed424f80c71b71 (diff) | |
download | mupdf-6796693d6b7db5933aaf5c6a33793abbfd3dd93c.tar.xz |
cleanups and c89 fixes
Diffstat (limited to 'render/glyphcache.c')
-rw-r--r-- | render/glyphcache.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/render/glyphcache.c b/render/glyphcache.c index c47ed0ed..517a67ef 100644 --- a/render/glyphcache.c +++ b/render/glyphcache.c @@ -340,14 +340,22 @@ fz_renderglyph(fz_glyphcache *arena, fz_glyph *glyph, fz_font *font, int cid, fz if (size > arena->size / 6) return nil; - while (arena->load > arena->slots * 75 / 100) { - covf ++; - evictlast(arena); + while (arena->load > arena->slots * 75 / 100) + { + while (arena->load > arena->slots * 60 / 100) + { + covf ++; + evictlast(arena); + } } - while (arena->used + size >= arena->size) { - coos ++; - evictlast(arena); + if (arena->used + size >= arena->size) + { + while (arena->used + size >= arena->size * 80 / 100) + { + coos ++; + evictlast(arena); + } } val = &arena->lru[arena->load++]; |