summaryrefslogtreecommitdiff
path: root/source/fitz/compressed-buffer.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-01-21 16:42:45 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-02-17 18:05:39 +0100
commitf84a189d5f94250e46d2cbd1a75aba00130e2dd6 (patch)
tree8ee614ab90de1baa8941f91ae4946ed5c2e70721 /source/fitz/compressed-buffer.c
parent681039767f2ccc72e236246178893eb0989169c9 (diff)
downloadmupdf-f84a189d5f94250e46d2cbd1a75aba00130e2dd6.tar.xz
Add ctx parameter and remove embedded contexts for API regularity.
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
Diffstat (limited to 'source/fitz/compressed-buffer.c')
-rw-r--r--source/fitz/compressed-buffer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/fitz/compressed-buffer.c b/source/fitz/compressed-buffer.c
index 48f88eff..85890c72 100644
--- a/source/fitz/compressed-buffer.c
+++ b/source/fitz/compressed-buffer.c
@@ -28,7 +28,7 @@ fz_open_image_decomp_stream(fz_context *ctx, fz_stream *chain, fz_compression_pa
{
case FZ_IMAGE_FAX:
*l2factor = 0;
- return fz_open_faxd(chain,
+ return fz_open_faxd(ctx, chain,
params->u.fax.k,
params->u.fax.end_of_line,
params->u.fax.encoded_byte_align,
@@ -39,21 +39,21 @@ fz_open_image_decomp_stream(fz_context *ctx, fz_stream *chain, fz_compression_pa
case FZ_IMAGE_JPEG:
if (*l2factor > 3)
*l2factor = 3;
- return fz_open_dctd(chain, params->u.jpeg.color_transform, *l2factor, NULL);
+ return fz_open_dctd(ctx, chain, params->u.jpeg.color_transform, *l2factor, NULL);
case FZ_IMAGE_RLD:
*l2factor = 0;
- return fz_open_rld(chain);
+ return fz_open_rld(ctx, chain);
case FZ_IMAGE_FLATE:
*l2factor = 0;
- chain = fz_open_flated(chain, 15);
+ chain = fz_open_flated(ctx, chain, 15);
if (params->u.flate.predictor > 1)
- chain = fz_open_predict(chain, params->u.flate.predictor, params->u.flate.columns, params->u.flate.colors, params->u.flate.bpc);
+ chain = fz_open_predict(ctx, chain, params->u.flate.predictor, params->u.flate.columns, params->u.flate.colors, params->u.flate.bpc);
return chain;
case FZ_IMAGE_LZW:
*l2factor = 0;
- chain = fz_open_lzwd(chain, params->u.lzw.early_change);
+ chain = fz_open_lzwd(ctx, chain, params->u.lzw.early_change);
if (params->u.lzw.predictor > 1)
- chain = fz_open_predict(chain, params->u.lzw.predictor, params->u.lzw.columns, params->u.lzw.colors, params->u.lzw.bpc);
+ chain = fz_open_predict(ctx, chain, params->u.lzw.predictor, params->u.lzw.columns, params->u.lzw.colors, params->u.lzw.bpc);
return chain;
default:
*l2factor = 0;