[cairo-commit] src/cairo-tor-scan-converter.c test/clip-operator.ref.png test/clip-operator.test-paginated.argb32.ref.png test/fill-degenerate-sort-order.ref.png test/fill-rule.ref.png test/finer-grained-fallbacks.ref.png test/linear-gradient.pdf.argb32.ref.png test/linear-gradient.pdf.ref.png test/linear-gradient.pdf.rgb24.ref.png test/mask-alpha.ref.png test/mask.pdf.argb32.ref.png test/mask.ref.png test/operator-clear.ref.png test/operator-clear.test-fallback.ref.png test/operator-clear.xlib.ref.png test/operator-source.ref.png test/radial-gradient.pdf.argb32.ref.png test/radial-gradient.pdf.ref.png test/radial-gradient.pdf.rgb24.ref.png test/trap-clip.pdf.argb32.ref.png test/trap-clip.pdf.rgb24.ref.png test/trap-clip.ref.png test/trap-clip.test-paginated.argb32.ref.png
M. Joonas Pihlaja
joonas at kemper.freedesktop.org
Fri Jul 10 09:11:41 PDT 2009
dev/null |binary
src/cairo-tor-scan-converter.c | 4 ++--
test/clip-operator.ref.png |binary
test/clip-operator.test-paginated.argb32.ref.png |binary
test/fill-degenerate-sort-order.ref.png |binary
test/fill-rule.ref.png |binary
test/finer-grained-fallbacks.ref.png |binary
test/linear-gradient.pdf.ref.png |binary
test/mask-alpha.ref.png |binary
test/mask.pdf.argb32.ref.png |binary
test/mask.ref.png |binary
test/operator-clear.ref.png |binary
test/operator-clear.test-fallback.ref.png |binary
test/operator-clear.xlib.ref.png |binary
test/operator-source.ref.png |binary
test/radial-gradient.pdf.ref.png |binary
test/trap-clip.pdf.argb32.ref.png |binary
test/trap-clip.pdf.rgb24.ref.png |binary
test/trap-clip.ref.png |binary
test/trap-clip.test-paginated.argb32.ref.png |binary
20 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 9686331cb07a8f9018f28dc7d6d6e3726e289fda
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date: Sat May 2 18:05:20 2009 +0300
[spans] Round rasterization grid pixel areas instead of truncating.
When converting a grid pixel area into the range [0,255] the
GRID_AREA_TO_ALPHA() macro would truncate extra bits off the result
rather than rounding. This could cause seams between abutting
collinear edges of separately rendered polygons even when the
coordinates of the abutting edges were the same.
Reported by Soeren Sandmann on the cairo mailing list:
http://lists.cairographics.org/archives/cairo/2009-May/017043.html
diff --git a/src/cairo-tor-scan-converter.c b/src/cairo-tor-scan-converter.c
index 4abafc4..7d37f47 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 3a685f5..7296a2d 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 22e080a..0203b1d 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 3a95c25..fa92ad4 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 6e19b62..8ed850d 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 5b1e532..0671d36 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 f820c37..0000000
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 ede7c90..b221a95 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 f820c37..0000000
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 d100da4..20f0663 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 dfdfdc0..30fecea 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 2c2fa11..b6c49ca 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 a3f8b7f..5b6b1f1 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 0000000..2f12e5e
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 0000000..2f12e5e
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 006bf95..376a707 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 6cee5d1..0000000
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 18368c1..dbb7312 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 6cee5d1..0000000
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 e42fee8..4697690 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 0616367..6ddbfa7 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 e8c26d3..832a2c6 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 dee57e7..7259edc 100644
Binary files a/test/trap-clip.test-paginated.argb32.ref.png and b/test/trap-clip.test-paginated.argb32.ref.png differ
More information about the cairo-commit
mailing list