diff --git a/src/cairo-tor-scan-converter.c b/src/cairo-tor-scan-converter.c index 4abafc41e..7d37f475c 100644 --- a/src/cairo-tor-scan-converter.c +++ b/src/cairo-tor-scan-converter.c @@ -295,9 +295,9 @@ typedef int grid_area_t; #elif GRID_XY == 15 # define GRID_AREA_TO_ALPHA(c) (((c) << 4) + (c)) #elif GRID_XY == 2*256*15 -# define GRID_AREA_TO_ALPHA(c) (((c) + ((c)<<4)) >> 9) +# define GRID_AREA_TO_ALPHA(c) (((c) + ((c)<<4) + 256) >> 9) #else -# define GRID_AREA_TO_ALPHA(c) ((c)*255 / GRID_XY) /* tweak me for rounding */ +# define GRID_AREA_TO_ALPHA(c) (((c)*255 + GRID_XY/2) / GRID_XY) #endif #define UNROLL3(x) x x x diff --git a/test/clip-operator.ref.png b/test/clip-operator.ref.png index 3a685f5e3..7296a2d86 100644 Binary files a/test/clip-operator.ref.png and b/test/clip-operator.ref.png differ diff --git a/test/clip-operator.test-paginated.argb32.ref.png b/test/clip-operator.test-paginated.argb32.ref.png index 22e080a26..0203b1db5 100644 Binary files a/test/clip-operator.test-paginated.argb32.ref.png and b/test/clip-operator.test-paginated.argb32.ref.png differ diff --git a/test/fill-degenerate-sort-order.ref.png b/test/fill-degenerate-sort-order.ref.png index 3a95c2571..fa92ad463 100644 Binary files a/test/fill-degenerate-sort-order.ref.png and b/test/fill-degenerate-sort-order.ref.png differ diff --git a/test/fill-rule.ref.png b/test/fill-rule.ref.png index 6e19b621b..8ed850d2a 100644 Binary files a/test/fill-rule.ref.png and b/test/fill-rule.ref.png differ diff --git a/test/finer-grained-fallbacks.ref.png b/test/finer-grained-fallbacks.ref.png index 5b1e532ba..0671d36c1 100644 Binary files a/test/finer-grained-fallbacks.ref.png and b/test/finer-grained-fallbacks.ref.png differ diff --git a/test/linear-gradient.pdf.argb32.ref.png b/test/linear-gradient.pdf.argb32.ref.png deleted file mode 100644 index f820c3748..000000000 Binary files a/test/linear-gradient.pdf.argb32.ref.png and /dev/null differ diff --git a/test/linear-gradient.pdf.ref.png b/test/linear-gradient.pdf.ref.png index ede7c9011..b221a95fd 100644 Binary files a/test/linear-gradient.pdf.ref.png and b/test/linear-gradient.pdf.ref.png differ diff --git a/test/linear-gradient.pdf.rgb24.ref.png b/test/linear-gradient.pdf.rgb24.ref.png deleted file mode 100644 index f820c3748..000000000 Binary files a/test/linear-gradient.pdf.rgb24.ref.png and /dev/null differ diff --git a/test/mask-alpha.ref.png b/test/mask-alpha.ref.png index d100da468..20f066340 100644 Binary files a/test/mask-alpha.ref.png and b/test/mask-alpha.ref.png differ diff --git a/test/mask.pdf.argb32.ref.png b/test/mask.pdf.argb32.ref.png index dfdfdc06f..30feceafe 100644 Binary files a/test/mask.pdf.argb32.ref.png and b/test/mask.pdf.argb32.ref.png differ diff --git a/test/mask.ref.png b/test/mask.ref.png index 2c2fa117c..b6c49ca5a 100644 Binary files a/test/mask.ref.png and b/test/mask.ref.png differ diff --git a/test/operator-clear.ref.png b/test/operator-clear.ref.png index a3f8b7f02..5b6b1f1a3 100644 Binary files a/test/operator-clear.ref.png and b/test/operator-clear.ref.png differ diff --git a/test/operator-clear.test-fallback.ref.png b/test/operator-clear.test-fallback.ref.png new file mode 100644 index 000000000..2f12e5e8b Binary files /dev/null and b/test/operator-clear.test-fallback.ref.png differ diff --git a/test/operator-clear.xlib.ref.png b/test/operator-clear.xlib.ref.png new file mode 100644 index 000000000..2f12e5e8b Binary files /dev/null and b/test/operator-clear.xlib.ref.png differ diff --git a/test/operator-source.ref.png b/test/operator-source.ref.png index 006bf9509..376a70700 100644 Binary files a/test/operator-source.ref.png and b/test/operator-source.ref.png differ diff --git a/test/radial-gradient.pdf.argb32.ref.png b/test/radial-gradient.pdf.argb32.ref.png deleted file mode 100644 index 6cee5d12f..000000000 Binary files a/test/radial-gradient.pdf.argb32.ref.png and /dev/null differ diff --git a/test/radial-gradient.pdf.ref.png b/test/radial-gradient.pdf.ref.png index 18368c14a..dbb7312a6 100644 Binary files a/test/radial-gradient.pdf.ref.png and b/test/radial-gradient.pdf.ref.png differ diff --git a/test/radial-gradient.pdf.rgb24.ref.png b/test/radial-gradient.pdf.rgb24.ref.png deleted file mode 100644 index 6cee5d12f..000000000 Binary files a/test/radial-gradient.pdf.rgb24.ref.png and /dev/null differ diff --git a/test/trap-clip.pdf.argb32.ref.png b/test/trap-clip.pdf.argb32.ref.png index e42fee81b..4697690b1 100644 Binary files a/test/trap-clip.pdf.argb32.ref.png and b/test/trap-clip.pdf.argb32.ref.png differ diff --git a/test/trap-clip.pdf.rgb24.ref.png b/test/trap-clip.pdf.rgb24.ref.png index 06163675c..6ddbfa7bf 100644 Binary files a/test/trap-clip.pdf.rgb24.ref.png and b/test/trap-clip.pdf.rgb24.ref.png differ diff --git a/test/trap-clip.ref.png b/test/trap-clip.ref.png index e8c26d32a..832a2c6cd 100644 Binary files a/test/trap-clip.ref.png and b/test/trap-clip.ref.png differ diff --git a/test/trap-clip.test-paginated.argb32.ref.png b/test/trap-clip.test-paginated.argb32.ref.png index dee57e7bd..7259edc49 100644 Binary files a/test/trap-clip.test-paginated.argb32.ref.png and b/test/trap-clip.test-paginated.argb32.ref.png differ