diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-02-03 15:29:20 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-02-03 15:29:20 +0100 |
commit | 1eb721680865658ed8ff04e13c81eb6a32b2b44c (patch) | |
tree | 2551cb051c80ce7731318c753ff92854e2571cf5 /draw/draw_glyph.c | |
parent | 27cc2be0735b9ff115a9565b905f3b46f26e9ec8 (diff) | |
download | mupdf-1eb721680865658ed8ff04e13c81eb6a32b2b44c.tar.xz |
Pass context explicitly to hash table functions.
Diffstat (limited to 'draw/draw_glyph.c')
-rw-r--r-- | draw/draw_glyph.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/draw/draw_glyph.c b/draw/draw_glyph.c index 1edcef4a..d7704a57 100644 --- a/draw/draw_glyph.c +++ b/draw/draw_glyph.c @@ -49,19 +49,19 @@ fz_evict_glyph_cache(fz_context *ctx) fz_pixmap *pixmap; int i; - for (i = 0; i < fz_hash_len(cache->hash); i++) + for (i = 0; i < fz_hash_len(ctx, cache->hash); i++) { - key = fz_hash_get_key(cache->hash, i); + key = fz_hash_get_key(ctx, cache->hash, i); if (key->font) fz_drop_font(ctx, key->font); - pixmap = fz_hash_get_val(cache->hash, i); + pixmap = fz_hash_get_val(ctx, cache->hash, i); if (pixmap) fz_drop_pixmap(ctx, pixmap); } cache->total = 0; - fz_empty_hash(cache->hash); + fz_empty_hash(ctx, cache->hash); } void @@ -71,7 +71,7 @@ fz_free_glyph_cache_context(fz_context *ctx) return; fz_evict_glyph_cache(ctx); - fz_free_hash(ctx->glyph_cache->hash); + fz_free_hash(ctx, ctx->glyph_cache->hash); fz_free(ctx, ctx->glyph_cache); ctx->glyph_cache = NULL; } @@ -113,7 +113,7 @@ fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix ctm, fz_color key.e = (ctm.e - floorf(ctm.e)) * 256; key.f = (ctm.f - floorf(ctm.f)) * 256; - val = fz_hash_find(cache->hash, &key); + val = fz_hash_find(ctx, cache->hash, &key); if (val) return fz_keep_pixmap(ctx, val); @@ -142,7 +142,7 @@ fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix ctm, fz_color fz_evict_glyph_cache(ctx); fz_try(ctx) { - fz_hash_insert(cache->hash, &key, val); + fz_hash_insert(ctx, cache->hash, &key, val); fz_keep_font(key.font); val = fz_keep_pixmap(ctx, val); } |