diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-02-13 17:53:21 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-02-13 22:05:12 +0000 |
commit | d4c73c65888e422f8b5d5c102ce80f4e82622bfb (patch) | |
tree | f9879093e06204e8e85842996dab3a91bd3df0e9 /draw/draw_glyph.c | |
parent | e9c534aee18fa86a61decb9f7c17b3d28ead94dc (diff) | |
download | mupdf-d4c73c65888e422f8b5d5c102ce80f4e82622bfb.tar.xz |
Add locking around freetype calls.
We only open one instance of freetype per document. We therefore
have to ensure that only 1 call to it takes place at a time. We
introduce a lock for this purpose (FZ_LOCK_FREETYPE), and arrange
to take/release it as required.
We also update the font context so it is properly shared.
Diffstat (limited to 'draw/draw_glyph.c')
-rw-r--r-- | draw/draw_glyph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/draw/draw_glyph.c b/draw/draw_glyph.c index 00eaf460..68ae3b80 100644 --- a/draw/draw_glyph.c +++ b/draw/draw_glyph.c @@ -68,7 +68,7 @@ fz_evict_glyph_cache(fz_context *ctx) } void -fz_free_glyph_cache_context(fz_context *ctx) +fz_drop_glyph_cache_context(fz_context *ctx) { if (!ctx->glyph_cache) return; @@ -86,7 +86,7 @@ fz_free_glyph_cache_context(fz_context *ctx) } fz_glyph_cache * -fz_glyph_cache_keep(fz_context *ctx) +fz_keep_glyph_cache(fz_context *ctx) { fz_lock(ctx, FZ_LOCK_GLYPHCACHE); ctx->glyph_cache->refs++; |