summaryrefslogtreecommitdiff
path: root/scripts/cmapdump.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-02-13 17:53:21 +0000
committerRobin Watts <robin.watts@artifex.com>2012-02-13 22:05:12 +0000
commitd4c73c65888e422f8b5d5c102ce80f4e82622bfb (patch)
treef9879093e06204e8e85842996dab3a91bd3df0e9 /scripts/cmapdump.c
parente9c534aee18fa86a61decb9f7c17b3d28ead94dc (diff)
downloadmupdf-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 'scripts/cmapdump.c')
-rw-r--r--scripts/cmapdump.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c
index 2f3c16df..12d6f2af 100644
--- a/scripts/cmapdump.c
+++ b/scripts/cmapdump.c
@@ -164,10 +164,15 @@ void fz_new_font_context(fz_context *ctx)
{
}
-void fz_free_font_context(fz_context *ctx)
+void fz_drop_font_context(fz_context *ctx)
{
}
+fz_font_context *fz_keep_font_context(fz_context *ctx)
+{
+ return NULL;
+}
+
void fz_new_aa_context(fz_context *ctx)
{
}
@@ -189,7 +194,7 @@ void fz_new_store_context(fz_context *ctx, unsigned int max)
{
}
-void fz_free_store_context(fz_context *ctx)
+void fz_drop_store_context(fz_context *ctx)
{
}
@@ -207,11 +212,11 @@ void fz_new_glyph_cache_context(fz_context *ctx)
{
}
-void fz_free_glyph_cache_context(fz_context *ctx)
+void fz_drop_glyph_cache_context(fz_context *ctx)
{
}
-fz_glyph_cache *fz_glyph_cache_keep(fz_context *ctx)
+fz_glyph_cache *fz_keep_glyph_cache(fz_context *ctx)
{
return NULL;
}