summaryrefslogtreecommitdiff
path: root/source/fitz/draw-paint.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-06 16:53:35 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-07 16:56:46 +0100
commite28172f2caef1b89e4f43cc76bf2d510eeb1dc3e (patch)
tree15ca079c2c67a2f034a533afda2b2ca242232720 /source/fitz/draw-paint.c
parent0e84c79eee422eb4724ff25baa4183d5e0fdb662 (diff)
downloadmupdf-e28172f2caef1b89e4f43cc76bf2d510eeb1dc3e.tar.xz
Tweak painters.
If we have a source alpha, and it's 0, then nothing to paint.
Diffstat (limited to 'source/fitz/draw-paint.c')
-rw-r--r--source/fitz/draw-paint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/fitz/draw-paint.c b/source/fitz/draw-paint.c
index 00b3868d..96bff706 100644
--- a/source/fitz/draw-paint.c
+++ b/source/fitz/draw-paint.c
@@ -847,7 +847,7 @@ template_span_with_mask_1_general(byte * restrict dp, int da, const byte * restr
int masa;
int ma = *mp++;
ma = FZ_EXPAND(ma);
- if (ma == 0)
+ if (ma == 0 || (sa && sp[1] == 0))
{
dp += 1 + da;
sp += 1 + sa;
@@ -915,7 +915,7 @@ template_span_with_mask_3_general(byte * restrict dp, int da, const byte * restr
int masa;
int ma = *mp++;
ma = FZ_EXPAND(ma);
- if (ma == 0)
+ if (ma == 0 || (sa && sp[3] == 0))
{
dp += 3 + da;
sp += 3 + sa;
@@ -1008,7 +1008,7 @@ template_span_with_mask_4_general(byte * restrict dp, int da, const byte * restr
int masa;
int ma = *mp++;
ma = FZ_EXPAND(ma);
- if (ma == 0)
+ if (ma == 0 || (sa && sp[4] == 0))
{
dp += 4 + da;
sp += 4 + sa;
@@ -1097,7 +1097,7 @@ template_span_with_mask_N_general(byte * restrict dp, int da, const byte * restr
{
int ma = *mp++;
ma = FZ_EXPAND(ma);
- if (ma == 0)
+ if (ma == 0 || (sa && sp[n] == 0))
{
dp += n + da;
sp += n + sa;