[cairo-commit] test/mask.c

Emmanuel Pacaud emmanuel at kemper.freedesktop.org
Tue Apr 18 12:52:22 PDT 2006


 test/mask.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

New commits:
diff-tree ffab2592fc5d0ccd498aff2f4e645eefe351b61b (from 9c65dee86b469c1eedf2690334d5a2b4afc849c8)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date:   Tue Apr 18 21:52:06 2006 +0200

    Clear completely the temporary surface between each subtest in mask.c
    
    That helps SVG backend to pass this test, since CAIRO_OPERATOR_CLEAR on a part of a surface use "comp-op" element which is not supported with current librsvg.

diff --git a/test/mask.c b/test/mask.c
index a9414e0..6d0e458 100644
--- a/test/mask.c
+++ b/test/mask.c
@@ -213,12 +213,10 @@ draw (cairo_t *cr, int width, int height
 		int x = i * (WIDTH + PAD) + PAD;
 		int y = (ARRAY_SIZE (mask_funcs) * k + j) * (HEIGHT + PAD) + PAD;
 		
-		/* Clear area we are going to be drawing onto */
+		/* Clear intermediate surface we are going to be drawing onto */
 		cairo_save (cr2);
-		cairo_set_source_rgba (cr2, 0, 0, 0, 0); /* transparent */
-		cairo_set_operator (cr2, CAIRO_OPERATOR_SOURCE);
-		cairo_rectangle (cr2, x, y, WIDTH, HEIGHT);
-		cairo_fill (cr2);
+		cairo_set_operator (cr2, CAIRO_OPERATOR_CLEAR);
+		cairo_paint (cr2);
 		cairo_restore (cr2);
 
 		/* draw */


More information about the cairo-commit mailing list