[cairo-commit] 3 commits - src/.gitignore src/Makefile.am.analysis test/filter-nearest-offset.c test/filter-nearest-offset-pdf-ref.png test/filter-nearest-offset-ps2-ref.png test/filter-nearest-offset-ps3-ref.png test/filter-nearest-offset-ref.png test/filter-nearest-offset-svg11-ref.png test/filter-nearest-offset-svg12-ref.png test/Makefile.am

Chris Wilson ickle at kemper.freedesktop.org
Tue Sep 30 03:14:26 PDT 2008


 src/.gitignore                           |    1 +
 src/Makefile.am.analysis                 |    4 +++-
 test/Makefile.am                         |    8 +++++---
 test/filter-nearest-offset-pdf-ref.png   |binary
 test/filter-nearest-offset-ps2-ref.png   |binary
 test/filter-nearest-offset-ps3-ref.png   |binary
 test/filter-nearest-offset-ref.png       |binary
 test/filter-nearest-offset-svg11-ref.png |binary
 test/filter-nearest-offset-svg12-ref.png |binary
 test/filter-nearest-offset.c             |    9 +++++++--
 10 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit d9f50d7841fa0216df157ba632483c8b27c50119
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 30 11:03:29 2008 +0100

    [test/filter-nearest-offset] Remove XFAIL status
    
    I swear that when I said that it was a rounding error, I was looking at an
    image where the squares were overlapping the lines and had a listing of
    all the coordinates used. However, the current output on all the machines
    I have to hand is correct so I believe the underlying bug to be fixed.
    
    Update the reference images for the external renderers because (a) GS
    exhibits the same bug cairo had and (b) librvsg/PDF do not use NEAREST
    when applying surface patterns, so the squares are blurred as a result.

diff --git a/test/Makefile.am b/test/Makefile.am
index 34c3a05..f8db937 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -481,6 +481,11 @@ REFERENCE_IMAGES = \
 	filter-bilinear-extents-ps2-ref.png \
 	filter-bilinear-extents-ps3-ref.png \
 	filter-nearest-offset-ref.png	\
+	filter-nearest-offset-pdf-ref.png	\
+	filter-nearest-offset-ps2-ref.png	\
+	filter-nearest-offset-ps3-ref.png	\
+	filter-nearest-offset-svg11-ref.png	\
+	filter-nearest-offset-svg12-ref.png	\
 	finer-grained-fallbacks-ref.png			\
 	finer-grained-fallbacks-rgb24-ref.png		\
 	finer-grained-fallbacks-ps2-argb32-ref.png	\
@@ -933,8 +938,6 @@ $(REFERENCE_IMAGES)
 #                         manipulation for SVG
 # extend-pad            - lacks implementation in pixman and consequently used
 #                         as an excuse for lack of support in other backends
-# filter-nearest-offset - banker's rounding vs arthimetic rounding in
-#                         double to fixed-point conversion
 # long-lines            - range overflow of fixed-point
 # self-copy-overlap     - vector surfaces take snapshot of patterns in contrast
 #                         to the raster backends which don't. One solution
@@ -957,7 +960,6 @@ big-trap$(EXEEXT)				\
 degenerate-path$(EXEEXT)			\
 device-offset-scale$(EXEEXT)			\
 extend-pad$(EXEEXT)				\
-filter-nearest-offset$(EXEEXT)			\
 long-lines$(EXEEXT)				\
 self-copy-overlap$(EXEEXT)			\
 self-intersecting$(EXEEXT)			\
diff --git a/test/filter-nearest-offset-pdf-ref.png b/test/filter-nearest-offset-pdf-ref.png
new file mode 100644
index 0000000..4dcfbed
Binary files /dev/null and b/test/filter-nearest-offset-pdf-ref.png differ
diff --git a/test/filter-nearest-offset-ps2-ref.png b/test/filter-nearest-offset-ps2-ref.png
new file mode 100644
index 0000000..185f779
Binary files /dev/null and b/test/filter-nearest-offset-ps2-ref.png differ
diff --git a/test/filter-nearest-offset-ps3-ref.png b/test/filter-nearest-offset-ps3-ref.png
new file mode 100644
index 0000000..185f779
Binary files /dev/null and b/test/filter-nearest-offset-ps3-ref.png differ
diff --git a/test/filter-nearest-offset-svg11-ref.png b/test/filter-nearest-offset-svg11-ref.png
new file mode 100644
index 0000000..df468f4
Binary files /dev/null and b/test/filter-nearest-offset-svg11-ref.png differ
diff --git a/test/filter-nearest-offset-svg12-ref.png b/test/filter-nearest-offset-svg12-ref.png
new file mode 100644
index 0000000..df468f4
Binary files /dev/null and b/test/filter-nearest-offset-svg12-ref.png differ
diff --git a/test/filter-nearest-offset.c b/test/filter-nearest-offset.c
index 0654548..76e826e 100644
--- a/test/filter-nearest-offset.c
+++ b/test/filter-nearest-offset.c
@@ -38,8 +38,7 @@ static cairo_test_draw_function_t draw;
 
 static const cairo_test_t test = {
     "filter-nearest-offset",
-    "Test sampling offset of CAIRO_FILTER_NEAREST"
-    "\nwrong sampling location for nearest-neighbor filter in libpixman and Render",
+    "Test sampling offset of CAIRO_FILTER_NEAREST",
     IMAGE_WIDTH, IMAGE_HEIGHT,
     draw
 };
commit 7d5e6a18d5e72366e19cb806cbdad5ed180b53da
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 30 10:04:12 2008 +0100

    [test/filter-nearest-offset] Paint a grey background
    
    Avoid requiring (an absent!) rgb24 ref image by using an opaque grey
    background. Confirm the reference image is identical to the old one
    (modulo the background change) using GIMP.

diff --git a/test/filter-nearest-offset-ref.png b/test/filter-nearest-offset-ref.png
index 46092e3..af81aee 100644
Binary files a/test/filter-nearest-offset-ref.png and b/test/filter-nearest-offset-ref.png differ
diff --git a/test/filter-nearest-offset.c b/test/filter-nearest-offset.c
index a4cb513..0654548 100644
--- a/test/filter-nearest-offset.c
+++ b/test/filter-nearest-offset.c
@@ -57,6 +57,12 @@ draw (cairo_t *cr, int width, int height)
     };
     int i, j;
 
+    /* fill with off-white to avoid a separate rgb24 ref image */
+    cairo_save (cr);
+    cairo_set_source_rgb (cr, .7, .7, .7);
+    cairo_paint (cr);
+    cairo_restore (cr);
+
     /* Draw reference lines where the jump should be. */
     cairo_move_to (cr, PAD + STEPS / 2 * (STAMP_WIDTH + PAD), 0);
     cairo_rel_line_to (cr, 0, IMAGE_HEIGHT);
commit 35be08715595aa0bda48ce0b3cb11711eee55c64
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 30 10:54:45 2008 +0100

    [Makefile.am] Only rerun headers-standalone if a header file has changed
    
    Use a stamp to mark the time that the headers were last checked and only
    rerun the test if any have been modified since.

diff --git a/src/.gitignore b/src/.gitignore
index 17ac503..932e397 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -30,3 +30,4 @@ TAGS
 tags
 check-has-hidden-symbols.i
 check-link
+headers-standalone
diff --git a/src/Makefile.am.analysis b/src/Makefile.am.analysis
index 8508fbf..4d527bf 100644
--- a/src/Makefile.am.analysis
+++ b/src/Makefile.am.analysis
@@ -20,11 +20,13 @@ uno:
 	@echo Checking enabled sources with uno checker
 	cd $(srcdir); $(UNO) $(PREPROCESS_ARGS) -DHAVE_CONFIG_H -U__GNUC__ $(enabled_cairo_sources)
 
-headers-standalone:
+headers-standalone: $(enabled_cairo_headers) $(enabled_cairo_private)
 	@echo Checking that enabled public/private headers can be compiled standalone
 	@status=true; for f in $(enabled_cairo_headers) $(enabled_cairo_private); do \
 		echo $(COMPILE) -o /dev/null $(srcdir)/$$f; \
 		$(COMPILE) -o /dev/null $(srcdir)/$$f || status=false; \
 	done; $$status
+	@touch $@
+CLEANFILES += headers-standalone
 
 analysis: all headers-standalone sparse splint uno


More information about the cairo-commit mailing list