[cairo-commit] test/a8-mask-rgb24-ref.png test/cairo-test.c test/caps-joins-alpha-rgb24-ref.png test/caps-joins-rgb24-ref.png test/caps-sub-paths-rgb24-ref.png test/clip-all-rgb24-ref.png test/composite-integer-translate-over-repeat-rgb24-ref.png test/composite-integer-translate-over-rgb24-ref.png test/composite-integer-translate-source-rgb24-ref.png test/create-from-png-rgb24-ref.png test/create-from-png-stream-rgb24-ref.png test/dash-caps-joins-rgb24-ref.png test/dash-offset-negative-rgb24-ref.png test/filter-nearest-offset-rgb24-ref.png test/imagediff.c test/leaky-polygon-rgb24-ref.png test/linear-gradient-rgb24-ref.png test/line-width-rgb24-ref.png test/move-to-show-surface-rgb24-ref.png test/paint-rgb24-ref.png test/paint-source-alpha-rgb24-ref.png test/paint-with-alpha-rgb24-ref.png test/path-data-rgb24-ref.png test/rectangle-rounding-error-rgb24-ref.png test/self-copy-rgb24-ref.png test/show-glyphs-many-rgb24-ref.png test/show-text-current-point-rgb24-ref.png test/source-clip-rgb24-ref.png test/surface-pattern-rgb24-ref.png test/text-antialias-gray-rgb24-ref.png test/text-antialias-none-rgb24-ref.png test/text-antialias-subpixel-rgb24-ref.png test/transforms-rgb24-ref.png test/translate-show-surface-rgb24-ref.png test/unantialiased-shapes-rgb24-ref.png

Carl Worth cworth at kemper.freedesktop.org
Wed Apr 26 12:39:57 PDT 2006


 dev/null                                                   |binary
 test/a8-mask-rgb24-ref.png                                 |    0 
 test/cairo-test.c                                          |   20 ++++++++-----
 test/caps-joins-alpha-rgb24-ref.png                        |    0 
 test/caps-joins-rgb24-ref.png                              |    0 
 test/caps-sub-paths-rgb24-ref.png                          |    0 
 test/clip-all-rgb24-ref.png                                |    0 
 test/composite-integer-translate-over-repeat-rgb24-ref.png |    0 
 test/composite-integer-translate-over-rgb24-ref.png        |    0 
 test/composite-integer-translate-source-rgb24-ref.png      |    0 
 test/create-from-png-rgb24-ref.png                         |    0 
 test/create-from-png-stream-rgb24-ref.png                  |    0 
 test/dash-caps-joins-rgb24-ref.png                         |    0 
 test/dash-offset-negative-rgb24-ref.png                    |    0 
 test/filter-nearest-offset-rgb24-ref.png                   |    0 
 test/imagediff.c                                           |   15 +++++----
 test/leaky-polygon-rgb24-ref.png                           |    0 
 test/line-width-rgb24-ref.png                              |    0 
 test/linear-gradient-rgb24-ref.png                         |    0 
 test/move-to-show-surface-rgb24-ref.png                    |    0 
 test/paint-rgb24-ref.png                                   |    0 
 test/paint-source-alpha-rgb24-ref.png                      |    0 
 test/paint-with-alpha-rgb24-ref.png                        |    0 
 test/path-data-rgb24-ref.png                               |    0 
 test/rectangle-rounding-error-rgb24-ref.png                |    0 
 test/self-copy-rgb24-ref.png                               |    0 
 test/show-glyphs-many-rgb24-ref.png                        |    0 
 test/show-text-current-point-rgb24-ref.png                 |    0 
 test/source-clip-rgb24-ref.png                             |    0 
 test/surface-pattern-rgb24-ref.png                         |    0 
 test/text-antialias-gray-rgb24-ref.png                     |    0 
 test/text-antialias-none-rgb24-ref.png                     |    0 
 test/text-antialias-subpixel-rgb24-ref.png                 |    0 
 test/transforms-rgb24-ref.png                              |    0 
 test/translate-show-surface-rgb24-ref.png                  |    0 
 test/unantialiased-shapes-rgb24-ref.png                    |    0 
 36 files changed, 22 insertions(+), 13 deletions(-)

New commits:
diff-tree 7110c168f7edadcedaea74a73b7ac6f095165931 (from fe8bf47afc11b12034fd2c92caf424c8911d630b)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Apr 26 12:36:22 2006 -0700

    Remove redeundant -rgb24-ref.png images.
    
    In several cases the -rgb24 reference images were identical to the -ref images.
    So we change the logic to find the latter if the former doesn't exist, and then
    we remove the redundant images.

diff --git a/test/a8-mask-rgb24-ref.png b/test/a8-mask-rgb24-ref.png
deleted file mode 100644
index 3855615..0000000
Binary files a/test/a8-mask-rgb24-ref.png and /dev/null differ
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 46cf5f4..2b47d05 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -85,7 +85,7 @@ static const char *fail_face = "", *norm
 /* Static data is messy, but we're coding for tests here, not a
  * general-purpose library, and it keeps the tests cleaner to avoid a
  * context object there, (though not a whole lot). */
-FILE *cairo_test_log_file;
+FILE *cairo_test_log_file = NULL;
 
 void
 cairo_test_init (const char *test_name)
@@ -107,9 +107,10 @@ void
 cairo_test_log (const char *fmt, ...)
 {
     va_list va;
+    FILE *file = cairo_test_log_file ? cairo_test_log_file : stderr;
 
     va_start (va, fmt);
-    vfprintf (cairo_test_log_file, fmt, va);
+    vfprintf (file, fmt, va);
     va_end (va);
 }
 
@@ -1422,6 +1423,7 @@ cairo_test_for_target (cairo_test_t *tes
 	srcdir = ".";
     format = _cairo_test_content_name (target->content);
     
+    /* First look for a target/format-specific reference image. */
     xasprintf (&png_name, "%s-%s-%s%s", test->name,
 	       target->name, format, CAIRO_TEST_PNG_SUFFIX);
     xasprintf (&ref_name, "%s/%s-%s-%s%s", srcdir, test->name,
@@ -1429,13 +1431,17 @@ cairo_test_for_target (cairo_test_t *tes
     if (access (ref_name, F_OK) != 0) {
 	free (ref_name);
 
-	if (target->content == CAIRO_CONTENT_COLOR_ALPHA ||
-	    target->content == CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED)
+	/* Next, look for format-specifc reference image. */
+	xasprintf (&ref_name, "%s/%s-%s%s", srcdir, test->name,
+		   format,CAIRO_TEST_REF_SUFFIX);
+
+	if (access (ref_name, F_OK) != 0) {
+	    free (ref_name);
+
+	    /* Finally, look for the standard reference image. */
 	    xasprintf (&ref_name, "%s/%s%s", srcdir, test->name,
 		       CAIRO_TEST_REF_SUFFIX);
-	else
-	    xasprintf (&ref_name, "%s/%s-%s%s", srcdir, test->name,
-		       format,CAIRO_TEST_REF_SUFFIX);
+	}
     }
     xasprintf (&diff_name, "%s-%s-%s%s", test->name,
 	       target->name, format, CAIRO_TEST_DIFF_SUFFIX);
diff --git a/test/caps-joins-alpha-rgb24-ref.png b/test/caps-joins-alpha-rgb24-ref.png
deleted file mode 100644
index 60163dd..0000000
Binary files a/test/caps-joins-alpha-rgb24-ref.png and /dev/null differ
diff --git a/test/caps-joins-rgb24-ref.png b/test/caps-joins-rgb24-ref.png
deleted file mode 100644
index bf3b214..0000000
Binary files a/test/caps-joins-rgb24-ref.png and /dev/null differ
diff --git a/test/caps-sub-paths-rgb24-ref.png b/test/caps-sub-paths-rgb24-ref.png
deleted file mode 100644
index 751194e..0000000
Binary files a/test/caps-sub-paths-rgb24-ref.png and /dev/null differ
diff --git a/test/clip-all-rgb24-ref.png b/test/clip-all-rgb24-ref.png
deleted file mode 100644
index 0e222f0..0000000
Binary files a/test/clip-all-rgb24-ref.png and /dev/null differ
diff --git a/test/composite-integer-translate-over-repeat-rgb24-ref.png b/test/composite-integer-translate-over-repeat-rgb24-ref.png
deleted file mode 100644
index 8b84dd2..0000000
Binary files a/test/composite-integer-translate-over-repeat-rgb24-ref.png and /dev/null differ
diff --git a/test/composite-integer-translate-over-rgb24-ref.png b/test/composite-integer-translate-over-rgb24-ref.png
deleted file mode 100644
index 40796e1..0000000
Binary files a/test/composite-integer-translate-over-rgb24-ref.png and /dev/null differ
diff --git a/test/composite-integer-translate-source-rgb24-ref.png b/test/composite-integer-translate-source-rgb24-ref.png
deleted file mode 100644
index 64c7859..0000000
Binary files a/test/composite-integer-translate-source-rgb24-ref.png and /dev/null differ
diff --git a/test/create-from-png-rgb24-ref.png b/test/create-from-png-rgb24-ref.png
deleted file mode 100644
index 0493617..0000000
Binary files a/test/create-from-png-rgb24-ref.png and /dev/null differ
diff --git a/test/create-from-png-stream-rgb24-ref.png b/test/create-from-png-stream-rgb24-ref.png
deleted file mode 100644
index 0493617..0000000
Binary files a/test/create-from-png-stream-rgb24-ref.png and /dev/null differ
diff --git a/test/dash-caps-joins-rgb24-ref.png b/test/dash-caps-joins-rgb24-ref.png
deleted file mode 100644
index 6ec274d..0000000
Binary files a/test/dash-caps-joins-rgb24-ref.png and /dev/null differ
diff --git a/test/dash-offset-negative-rgb24-ref.png b/test/dash-offset-negative-rgb24-ref.png
deleted file mode 100644
index 4c954e0..0000000
Binary files a/test/dash-offset-negative-rgb24-ref.png and /dev/null differ
diff --git a/test/filter-nearest-offset-rgb24-ref.png b/test/filter-nearest-offset-rgb24-ref.png
deleted file mode 100644
index 46092e3..0000000
Binary files a/test/filter-nearest-offset-rgb24-ref.png and /dev/null differ
diff --git a/test/imagediff.c b/test/imagediff.c
index 8e13a1f..de66b68 100644
--- a/test/imagediff.c
+++ b/test/imagediff.c
@@ -34,6 +34,7 @@
 int 
 main (int argc, char *argv[])
 {
+    read_png_status_t status;
     unsigned char *buffer_a;
     unsigned int width_a, height_a, stride_a;
     unsigned char *buffer_b;
@@ -51,8 +52,13 @@ main (int argc, char *argv[])
 	exit (1);
     }
 
-    read_png_argb32 (argv[1], &buffer_a, &width_a, &height_a, &stride_a);
-    read_png_argb32 (argv[2], &buffer_b, &width_b, &height_b, &stride_b);
+    status = read_png_argb32 (argv[1], &buffer_a, &width_a, &height_a, &stride_a);
+    if (status)
+	return 1;
+
+    status = read_png_argb32 (argv[2], &buffer_b, &width_b, &height_b, &stride_b);
+    if (status)
+	return 1;
 
     if ((width_a == width_b) && (height_a == height_b) && (stride_a == stride_b))
     {
@@ -77,8 +83,5 @@ main (int argc, char *argv[])
 
     free (buffer);
 
-    return total_pixels_changed;
+    return (total_pixels_changed != 0);
 }
-
-
-
diff --git a/test/leaky-polygon-rgb24-ref.png b/test/leaky-polygon-rgb24-ref.png
deleted file mode 100644
index 6a77482..0000000
Binary files a/test/leaky-polygon-rgb24-ref.png and /dev/null differ
diff --git a/test/line-width-rgb24-ref.png b/test/line-width-rgb24-ref.png
deleted file mode 100644
index a63262f..0000000
Binary files a/test/line-width-rgb24-ref.png and /dev/null differ
diff --git a/test/linear-gradient-rgb24-ref.png b/test/linear-gradient-rgb24-ref.png
deleted file mode 100644
index 9cc5458..0000000
Binary files a/test/linear-gradient-rgb24-ref.png and /dev/null differ
diff --git a/test/move-to-show-surface-rgb24-ref.png b/test/move-to-show-surface-rgb24-ref.png
deleted file mode 100644
index b5f8348..0000000
Binary files a/test/move-to-show-surface-rgb24-ref.png and /dev/null differ
diff --git a/test/paint-rgb24-ref.png b/test/paint-rgb24-ref.png
deleted file mode 100644
index fff03b3..0000000
Binary files a/test/paint-rgb24-ref.png and /dev/null differ
diff --git a/test/paint-source-alpha-rgb24-ref.png b/test/paint-source-alpha-rgb24-ref.png
deleted file mode 100644
index 4907470..0000000
Binary files a/test/paint-source-alpha-rgb24-ref.png and /dev/null differ
diff --git a/test/paint-with-alpha-rgb24-ref.png b/test/paint-with-alpha-rgb24-ref.png
deleted file mode 100644
index 228a78a..0000000
Binary files a/test/paint-with-alpha-rgb24-ref.png and /dev/null differ
diff --git a/test/path-data-rgb24-ref.png b/test/path-data-rgb24-ref.png
deleted file mode 100644
index 627ba86..0000000
Binary files a/test/path-data-rgb24-ref.png and /dev/null differ
diff --git a/test/rectangle-rounding-error-rgb24-ref.png b/test/rectangle-rounding-error-rgb24-ref.png
deleted file mode 100644
index c3a6840..0000000
Binary files a/test/rectangle-rounding-error-rgb24-ref.png and /dev/null differ
diff --git a/test/self-copy-rgb24-ref.png b/test/self-copy-rgb24-ref.png
deleted file mode 100644
index 92a20db..0000000
Binary files a/test/self-copy-rgb24-ref.png and /dev/null differ
diff --git a/test/show-glyphs-many-rgb24-ref.png b/test/show-glyphs-many-rgb24-ref.png
deleted file mode 100644
index 450e8e0..0000000
Binary files a/test/show-glyphs-many-rgb24-ref.png and /dev/null differ
diff --git a/test/show-text-current-point-rgb24-ref.png b/test/show-text-current-point-rgb24-ref.png
deleted file mode 100644
index 9233244..0000000
Binary files a/test/show-text-current-point-rgb24-ref.png and /dev/null differ
diff --git a/test/source-clip-rgb24-ref.png b/test/source-clip-rgb24-ref.png
deleted file mode 100644
index 8df2bff..0000000
Binary files a/test/source-clip-rgb24-ref.png and /dev/null differ
diff --git a/test/surface-pattern-rgb24-ref.png b/test/surface-pattern-rgb24-ref.png
deleted file mode 100644
index 1a64106..0000000
Binary files a/test/surface-pattern-rgb24-ref.png and /dev/null differ
diff --git a/test/text-antialias-gray-rgb24-ref.png b/test/text-antialias-gray-rgb24-ref.png
deleted file mode 100644
index 8b60f7a..0000000
Binary files a/test/text-antialias-gray-rgb24-ref.png and /dev/null differ
diff --git a/test/text-antialias-none-rgb24-ref.png b/test/text-antialias-none-rgb24-ref.png
deleted file mode 100644
index a8ccf96..0000000
Binary files a/test/text-antialias-none-rgb24-ref.png and /dev/null differ
diff --git a/test/text-antialias-subpixel-rgb24-ref.png b/test/text-antialias-subpixel-rgb24-ref.png
deleted file mode 100644
index 88f76c0..0000000
Binary files a/test/text-antialias-subpixel-rgb24-ref.png and /dev/null differ
diff --git a/test/transforms-rgb24-ref.png b/test/transforms-rgb24-ref.png
deleted file mode 100644
index 5744569..0000000
Binary files a/test/transforms-rgb24-ref.png and /dev/null differ
diff --git a/test/translate-show-surface-rgb24-ref.png b/test/translate-show-surface-rgb24-ref.png
deleted file mode 100644
index a43f8b6..0000000
Binary files a/test/translate-show-surface-rgb24-ref.png and /dev/null differ
diff --git a/test/unantialiased-shapes-rgb24-ref.png b/test/unantialiased-shapes-rgb24-ref.png
deleted file mode 100644
index ad79993..0000000
Binary files a/test/unantialiased-shapes-rgb24-ref.png and /dev/null differ


More information about the cairo-commit mailing list