[cairo-commit] 3 commits - test/clip-operator.c test/extend-reflect.c test/extend-reflect-ref.png test/Makefile.am test/operator-clear.c test/operator-source.c test/random-intersections.c test/random-intersections-ps-argb32-ref.png test/random-intersections-quartz-ref.png test/random-intersections-quartz-rgb24-ref.png test/random-intersections-ref.png test/random-intersections-rgb24-ref.png

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Mar 5 16:23:26 PST 2007


 dev/null                                       |binary
 test/Makefile.am                               |    3 ---
 test/clip-operator.c                           |    2 --
 test/extend-reflect-ref.png                    |binary
 test/extend-reflect.c                          |   17 ++++++-----------
 test/operator-clear.c                          |    2 --
 test/operator-source.c                         |    2 --
 test/random-intersections-ps-argb32-ref.png    |binary
 test/random-intersections-quartz-ref.png       |    0 
 test/random-intersections-quartz-rgb24-ref.png |    0 
 test/random-intersections-ref.png              |binary
 test/random-intersections-rgb24-ref.png        |    0 
 test/random-intersections.c                    |    4 ++++
 13 files changed, 10 insertions(+), 20 deletions(-)

New commits:
diff-tree 393908c34dbf2484b811b84581984563a7115e38 (from 4716ed760c1cc8095587af130964fbc3432ed14d)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Mar 5 19:22:41 2007 -0500

    [test] Modify extend-reflect to need a smaller reference image

diff --git a/test/extend-reflect-ref.png b/test/extend-reflect-ref.png
index face8b5..93a8b00 100644
Binary files a/test/extend-reflect-ref.png and b/test/extend-reflect-ref.png differ
diff --git a/test/extend-reflect.c b/test/extend-reflect.c
index f9d2c4f..e23c8f6 100644
--- a/test/extend-reflect.c
+++ b/test/extend-reflect.c
@@ -2,7 +2,6 @@
 #include "cairo-test.h"
 #include <stdio.h>
 
-#define SIZE 600
 const char	png_filename[]	= "romedalen.png";
 
 static cairo_test_draw_function_t draw;
@@ -10,22 +9,18 @@ static cairo_test_draw_function_t draw;
 cairo_test_t test = {
     "extend-reflect",
     "Test CAIRO_EXTEND_REFLECT for surface patterns",
-    SIZE, SIZE,
+    256 + 32*2, 192 + 32*2,
     draw
 };
 
 static cairo_test_status_t
 draw (cairo_t *cr, int width, int height)
 {
-    cairo_pattern_t *pattern;
-    cairo_set_source_rgba (cr, 0, 0, 0, 1);
-    cairo_rectangle (cr, 0, 0, SIZE, SIZE);
-    cairo_fill (cr);
-
-    pattern = cairo_test_create_pattern_from_png (png_filename);
-    cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REFLECT);
-    cairo_set_source (cr, pattern);
-    cairo_pattern_destroy (pattern);
+    cairo_surface_t *surface;
+
+    surface = cairo_test_create_surface_from_png (png_filename);
+    cairo_set_source_surface (cr, surface, 32, 32);
+    cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REFLECT);
 
     cairo_paint (cr);
 
diff-tree 4716ed760c1cc8095587af130964fbc3432ed14d (from feba319413bde73f8c1454fc0f3a1b3af03dfde4)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Mar 5 19:15:35 2007 -0500

    [test] Remove some ref images from random-intersections
    
    Each one is larger than 100kb, so paint background black to reuse
    same ref image for rgb24 and argb32 cases.  Also remove Quartz ref
    images for now.

diff --git a/test/Makefile.am b/test/Makefile.am
index 858c59d..940c09b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -317,10 +317,7 @@ REFERENCE_IMAGES = \
 	push-group-svg-argb32-ref.png	\
 	radial-gradient-ref.png	\
 	random-intersections-ps-argb32-ref.png	\
-	random-intersections-quartz-ref.png	\
-	random-intersections-quartz-rgb24-ref.png	\
 	random-intersections-ref.png	\
-	random-intersections-rgb24-ref.png	\
 	rectangle-rounding-error-ref.png	\
 	rectilinear-stroke-ref.png	\
 	rel-path-quartz-ref.png	\
diff --git a/test/random-intersections-ps-argb32-ref.png b/test/random-intersections-ps-argb32-ref.png
index 232ec66..faffd15 100644
Binary files a/test/random-intersections-ps-argb32-ref.png and b/test/random-intersections-ps-argb32-ref.png differ
diff --git a/test/random-intersections-quartz-ref.png b/test/random-intersections-quartz-ref.png
deleted file mode 100644
index a687088..0000000
Binary files a/test/random-intersections-quartz-ref.png and /dev/null differ
diff --git a/test/random-intersections-quartz-rgb24-ref.png b/test/random-intersections-quartz-rgb24-ref.png
deleted file mode 100644
index 77f73cd..0000000
Binary files a/test/random-intersections-quartz-rgb24-ref.png and /dev/null differ
diff --git a/test/random-intersections-ref.png b/test/random-intersections-ref.png
index 25fc0a4..9f1134a 100644
Binary files a/test/random-intersections-ref.png and b/test/random-intersections-ref.png differ
diff --git a/test/random-intersections-rgb24-ref.png b/test/random-intersections-rgb24-ref.png
deleted file mode 100644
index 9f1134a..0000000
Binary files a/test/random-intersections-rgb24-ref.png and /dev/null differ
diff --git a/test/random-intersections.c b/test/random-intersections.c
index 0f1c2d2..5aa8e48 100644
--- a/test/random-intersections.c
+++ b/test/random-intersections.c
@@ -51,6 +51,10 @@ static cairo_test_status_t
 draw (cairo_t *cr, int width, int height)
 {
     int i;
+
+    cairo_set_source_rgb (cr, 0, 0, 0);
+    cairo_paint (cr);
+
     state = 0x12345678;
     cairo_translate (cr, 1, 1);
     cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
diff-tree feba319413bde73f8c1454fc0f3a1b3af03dfde4 (from e1a598211b1944bad6b32148da052208d9b58093)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Mar 5 19:02:59 2007 -0500

    [test] Remove unused variable

diff --git a/test/clip-operator.c b/test/clip-operator.c
index 4d7f81e..0745e16 100644
--- a/test/clip-operator.c
+++ b/test/clip-operator.c
@@ -31,8 +31,6 @@
 #define HEIGHT 16
 #define PAD 2
 
-const char	png_filename[]	= "romedalen.png";
-
 static void
 draw_mask (cairo_t *cr, int x, int y)
 {
diff --git a/test/operator-clear.c b/test/operator-clear.c
index 89b50e4..d076047 100644
--- a/test/operator-clear.c
+++ b/test/operator-clear.c
@@ -32,8 +32,6 @@
 #define HEIGHT 16
 #define PAD 2
 
-const char	png_filename[]	= "romedalen.png";
-
 static void
 set_solid_pattern (cairo_t *cr, int x, int y)
 {
diff --git a/test/operator-source.c b/test/operator-source.c
index 912fec6..4224c15 100644
--- a/test/operator-source.c
+++ b/test/operator-source.c
@@ -32,8 +32,6 @@
 #define HEIGHT 16
 #define PAD 2
 
-const char	png_filename[]	= "romedalen.png";
-
 static void
 set_solid_pattern (cairo_t *cr, int x, int y)
 {


More information about the cairo-commit mailing list