diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-12-13 16:54:29 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-02 20:04:44 +0000 |
commit | fc5bcdc79a12fb01b6cd07aa142c01ef11430b34 (patch) | |
tree | 547ed060a16453df001ffcb34657de46418872ff /source/xps | |
parent | 651f13408c67a8392ad93adda079c096d8a6118c (diff) | |
download | mupdf-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/xps')
-rw-r--r-- | source/xps/xps-zip.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c index 70b643af..c9dc9840 100644 --- a/source/xps/xps-zip.c +++ b/source/xps/xps-zip.c @@ -683,6 +683,14 @@ xps_meta(xps_document *doc, int key, void *ptr, int size) } static void +xps_rebind(xps_document *doc, fz_context *ctx) +{ + doc->ctx = ctx; + fz_rebind_stream(doc->file, ctx); + fz_rebind_device(doc->dev, ctx); +} + +static void xps_init_document(xps_document *doc) { doc->super.close = (void*)xps_close_document; @@ -694,4 +702,5 @@ xps_init_document(xps_document *doc) doc->super.run_page_contents = (void*)xps_run_page; doc->super.free_page = (void*)xps_free_page; doc->super.meta = (void*)xps_meta; + doc->super.rebind = (void*)xps_rebind; } |