summaryrefslogtreecommitdiff
path: root/source/fitz/draw-device.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-09-27 17:31:59 +0100
committerRobin Watts <robin.watts@artifex.com>2017-09-27 18:05:14 +0100
commit0cf2cd4eb8b1ef891a853c0abb9ca8a317638969 (patch)
tree9683b2b15627ab38704c57c0bbddf9e9f145ed8d /source/fitz/draw-device.c
parentc2663e51238ec8256da7fc61ad580db891d9fe9a (diff)
downloadmupdf-0cf2cd4eb8b1ef891a853c0abb9ca8a317638969.tar.xz
Bug 698588: Short circuit plotting of images if alpha == 0.
Diffstat (limited to 'source/fitz/draw-device.c')
-rw-r--r--source/fitz/draw-device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index e001c3ea..9180e360 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -1330,6 +1330,9 @@ fz_draw_fill_image(fz_context *ctx, fz_device *devp, fz_image *image, const fz_m
fz_colorspace *src_cs;
fz_colorspace *prf = fz_proof_cs(ctx, dev);
+ if (alpha == 0)
+ return;
+
if (dev->top == 0 && dev->resolve_spots)
state = push_group_for_separations(ctx, dev, color_params, prf, dev->default_cs);
@@ -1477,6 +1480,9 @@ fz_draw_fill_image_mask(fz_context *ctx, fz_device *devp, fz_image *image, const
fz_colorspace *colorspace = NULL;
fz_colorspace *prf = fz_proof_cs(ctx, dev);
+ if (alpha == 0)
+ return;
+
if (dev->top == 0 && dev->resolve_spots)
state = push_group_for_separations(ctx, dev, color_params, prf, dev->default_cs);