diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-05-24 15:34:28 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-05-24 15:37:54 +0100 |
commit | 69db6d1dc9d68821965afaf42f11a5674fbfc275 (patch) | |
tree | 0485933e2ff1197683658d2f0219efa1bb9b44b4 /source/fitz/draw-affine.c | |
parent | 38c45fc53471720f9c00cc3a09014879da996ba3 (diff) | |
download | mupdf-69db6d1dc9d68821965afaf42f11a5674fbfc275.tar.xz |
Fix optimisation in fz_paint_affine_N_near
Only do int to int copying if we have an int to copy from.
Also, when copying int to int, copy int32_t to int32_t to make
us more future proof.
Diffstat (limited to 'source/fitz/draw-affine.c')
-rw-r--r-- | source/fitz/draw-affine.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fitz/draw-affine.c b/source/fitz/draw-affine.c index 71a0cecd..0d768013 100644 --- a/source/fitz/draw-affine.c +++ b/source/fitz/draw-affine.c @@ -374,9 +374,9 @@ fz_paint_affine_N_near(byte * restrict dp, int da, const byte * restrict sp, int int t = 255 - a; if (t == 0) { - if (n1+da == 4) + if (n1+da == 4 && n1+sa == 4) { - *(int *)dp = *(int *)sample; + *(int32_t *)dp = *(int32_t *)sample; } else { @@ -424,9 +424,9 @@ fz_paint_affine_N_near(byte * restrict dp, int da, const byte * restrict sp, int int t = 255 - a; if (t == 0) { - if (n1+da == 4) + if (n1+da == 4 && n1+sa == 4) { - *(int *)dp = *(int *)sample; + *(int32_t *)dp = *(int32_t *)sample; } else { @@ -471,9 +471,9 @@ fz_paint_affine_N_near(byte * restrict dp, int da, const byte * restrict sp, int int t = 255 - a; if (t == 0) { - if (n1+da == 4) + if (n1+da == 4 && n1+sa == 4) { - *(int *)dp = *(int *)sample; + *(int32_t *)dp = *(int32_t *)sample; } else { |