From e28172f2caef1b89e4f43cc76bf2d510eeb1dc3e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 6 Oct 2016 16:53:35 +0100 Subject: Tweak painters. If we have a source alpha, and it's 0, then nothing to paint. --- source/fitz/draw-paint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/fitz') 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; -- cgit v1.2.3