diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-01 14:45:44 +0000 |
---|---|---|
committer | Robin Watts <robin@ghostscript.com> | 2012-03-01 15:30:34 +0000 |
commit | 152ce17e73ab54e0f619ec2088b34a4a5e53f421 (patch) | |
tree | b21b10da8047e69c18fbe73dc6c83fd2b6a833fb | |
parent | 2ec4dae7c4c1b91f15651573988e8eadf26a81a0 (diff) | |
download | mupdf-152ce17e73ab54e0f619ec2088b34a4a5e53f421.tar.xz |
Remove mask entry from fz_pixmap as never used any more.
Also, the attempts to keep it up to date were causing race
conditions in multithreading cases.
-rw-r--r-- | fitz/fitz.h | 3 | ||||
-rw-r--r-- | fitz/res_colorspace.c | 2 | ||||
-rw-r--r-- | fitz/res_pixmap.c | 3 | ||||
-rw-r--r-- | pdf/pdf_colorspace.c | 2 | ||||
-rw-r--r-- | pdf/pdf_image.c | 6 |
5 files changed, 0 insertions, 16 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 0d0d657a..825ed4ba 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -1233,8 +1233,6 @@ typedef struct fz_colorspace_s fz_colorspace; n: The number of color components in the image. Always includes a separate alpha channel. XXX RGBA=4 - mask: XXX - interpolate: A boolean flag set to non-zero if the image will be drawn using linear interpolation, or set to zero if image will be using nearest neighbour sampling. @@ -1254,7 +1252,6 @@ struct fz_pixmap_s { fz_storable storable; int x, y, w, h, n; - fz_pixmap *mask; /* explicit soft/image mask */ int interpolate; int xres, yres; fz_colorspace *colorspace; diff --git a/fitz/res_colorspace.c b/fitz/res_colorspace.c index c25fc99f..3cdc0fa3 100644 --- a/fitz/res_colorspace.c +++ b/fitz/res_colorspace.c @@ -506,8 +506,6 @@ fz_convert_pixmap(fz_context *ctx, fz_pixmap *sp, fz_pixmap *dp) assert(ss && ds); - if (sp->mask) - dp->mask = fz_keep_pixmap(ctx, sp->mask); dp->interpolate = sp->interpolate; if (ss == fz_device_gray) diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c index 328a8c2d..1b254f36 100644 --- a/fitz/res_pixmap.c +++ b/fitz/res_pixmap.c @@ -17,8 +17,6 @@ fz_free_pixmap_imp(fz_context *ctx, fz_storable *pix_) { fz_pixmap *pix = (fz_pixmap *)pix_; - if (pix->mask) - fz_drop_pixmap(ctx, pix->mask); if (pix->colorspace) fz_drop_colorspace(ctx, pix->colorspace); if (pix->free_samples) @@ -37,7 +35,6 @@ fz_new_pixmap_with_data(fz_context *ctx, fz_colorspace *colorspace, int w, int h pix->y = 0; pix->w = w; pix->h = h; - pix->mask = NULL; pix->interpolate = 1; pix->xres = 96; pix->yres = 96; diff --git a/pdf/pdf_colorspace.c b/pdf/pdf_colorspace.c index 0e9423b4..05d0c135 100644 --- a/pdf/pdf_colorspace.c +++ b/pdf/pdf_colorspace.c @@ -210,8 +210,6 @@ pdf_expand_indexed_pixmap(fz_context *ctx, fz_pixmap *src) } } - if (src->mask) - dst->mask = fz_keep_pixmap(ctx, src->mask); dst->interpolate = src->interpolate; return dst; diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c index cd2726a5..1702cd30 100644 --- a/pdf/pdf_image.c +++ b/pdf/pdf_image.c @@ -111,7 +111,6 @@ decomp_image_from_stream(fz_context *ctx, fz_stream *stm, pdf_image *image, int fz_try(ctx) { tile = fz_new_pixmap(ctx, image->base.colorspace, w, h); - tile->mask = fz_image_to_pixmap(ctx, image->base.mask, w, h); tile->interpolate = image->interpolate; stride = (w * image->n * image->bpc + 7) / 8; @@ -250,11 +249,6 @@ pdf_image_get_pixmap(fz_context *ctx, fz_image *image_, int w, int h) tile = image->tile; if (!tile) return NULL; - if (image->base.mask) - { - fz_drop_pixmap(ctx, tile->mask); - tile->mask = fz_image_to_pixmap(ctx, image->base.mask, w, h); - } return fz_keep_pixmap(ctx, tile); /* That's all we can give you! */ } |