summaryrefslogtreecommitdiff
path: root/source/img/muimage.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-12-13 16:54:29 +0000
committerRobin Watts <robin.watts@artifex.com>2014-01-02 20:04:44 +0000
commitfc5bcdc79a12fb01b6cd07aa142c01ef11430b34 (patch)
tree547ed060a16453df001ffcb34657de46418872ff /source/img/muimage.c
parent651f13408c67a8392ad93adda079c096d8a6118c (diff)
downloadmupdf-fc5bcdc79a12fb01b6cd07aa142c01ef11430b34.tar.xz
Add rebinding for fz_devices and fz_documents
The SVG device needs rebinding as it holds a file. The PDF device needs to rebind the underlying pdf document. All documents need to rebind their underlying streams.
Diffstat (limited to 'source/img/muimage.c')
-rw-r--r--source/img/muimage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/img/muimage.c b/source/img/muimage.c
index 759653a7..7a6dfc3a 100644
--- a/source/img/muimage.c
+++ b/source/img/muimage.c
@@ -136,6 +136,13 @@ image_meta(image_document *doc, int key, void *ptr, int size)
}
static void
+image_rebind(image_document *doc, fz_context *ctx)
+{
+ doc->ctx = ctx;
+ fz_rebind_stream(doc->file, ctx);
+}
+
+static void
image_init_document(image_document *doc)
{
doc->super.close = (void*)image_close_document;
@@ -145,4 +152,5 @@ image_init_document(image_document *doc)
doc->super.run_page_contents = (void*)image_run_page;
doc->super.free_page = (void*)image_free_page;
doc->super.meta = (void*)image_meta;
+ doc->super.rebind = (void*)image_rebind;
}