[cairo-commit] cairo/test .cvsignore, 1.43, 1.44 Makefile.am, 1.79, 1.80 clip-operator-ref.png, 1.2, 1.3 operator-clear-ref.png, NONE, 1.1 operator-clear.c, NONE, 1.1 operator-source-ref.png, NONE, 1.1 operator-source.c, NONE, 1.1 unbounded-operator-ref.png, 1.1, 1.2 unbounded-operator.c, 1.1, 1.2

Owen Taylor commit at pdx.freedesktop.org
Thu Aug 18 15:50:38 PDT 2005


Committed by: otaylor

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv10706/test

Modified Files:
	.cvsignore Makefile.am clip-operator-ref.png 
	unbounded-operator-ref.png unbounded-operator.c 
Added Files:
	operator-clear-ref.png operator-clear.c 
	operator-source-ref.png operator-source.c 
Log Message:
2005-08-17  Owen Taylor  <otaylor at redhat.com>
	
	* src/cairo-gstate.c: Implement new equations for CLEAR and SOURCE
	CLEAR: (mask IN clip) ? 0 : dest
	SOURCE: (mask IN clip) ? src : dest
	That behave more like what people expect.

	* src/cairo-gstate.c (_cairo_operator_bounded): CLEAR and SOURCE are 
	now bounded.

	* src/cairo-font.c (_cairo_ft_scaled_font_show_glyphs)
	* src/cairo-surface.c (_cairo_surface_composite_trapezoids):
	Assert that SOURCE and CLEAR aren't passed to these functions.

	* src/cairo-surface.c (_cairo_surface_composite):
	Assert that SOURCE and CLEAR aren't passed to these functions
	when there is a mask.

	* src/cairo-xlib-surface.c (_cairo_xlib_surface_composite)
	* src/cairo-image-surface.c (_cairo_image_surface_composite): 
	Do fixups for SOURCE and CLEAR as well as unbounded operators,
	since in the absence of a mask, we need SOURCE to work 
	correctly (don't care about CLEAR)

	* src/cairo-ft-font.c (_transform_glyph_bitmap, _cairo_ft_font_show_glyphs)
	Consistently use CLEAR/TRANSPARENT (source doesn't matter)
	rather than SOURCE/TRANSPARENT when clearing rectangles.

	* src/cairo-xlib-surface.c src/cairo-surface.c: Use 
	IN rather than SOURCE as an example of an unbounded operator in
	docs.

	* test/unbounded-operator.c: Remove CLEAR/SOURCE columns since
	they are no longer unbounded.

	* test/operator-clear.c test/operator-source Makefile.am: Add
	targetted tests of CLEAR/SOURCE.

Index: .cvsignore
===================================================================
RCS file: /cvs/cairo/cairo/test/.cvsignore,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- .cvsignore	17 Aug 2005 16:51:09 -0000	1.43
+++ .cvsignore	18 Aug 2005 22:50:36 -0000	1.44
@@ -26,6 +26,8 @@
 mask-ctm
 mask-surface-ctm
 move-to-show-surface
+operator-clear
+operator-source
 paint
 paint-with-alpha
 path-data

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/test/Makefile.am,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- Makefile.am	17 Aug 2005 16:51:09 -0000	1.79
+++ Makefile.am	18 Aug 2005 22:50:36 -0000	1.80
@@ -21,6 +21,8 @@
 mask-ctm			\
 mask-surface-ctm		\
 move-to-show-surface		\
+operator-clear			\
+operator-source			\
 paint				\
 paint-with-alpha		\
 path-data			\
@@ -87,6 +89,8 @@
 mask-ctm-ref.png			\
 mask-surface-ctm-ref.png		\
 move-to-show-surface-ref.png		\
+operator-clear-ref.png			\
+operator-source-ref.png			\
 paint-ref.png				\
 paint-with-alpha-ref.png		\
 path-data-ref.png			\
@@ -188,6 +192,8 @@
 mask_ctm_LDADD = $(LDADDS)
 mask_surface_ctm_LDADD = $(LDADDS)
 move_to_show_surface_LDADD = $(LDADDS)
+operator_clear_LDADD = $(LDADDS)
+operator_source_LDADD = $(LDADDS)
 paint_LDADD = $(LDADDS)
 paint_with_alpha_LDADD = $(LDADDS)
 path_data_LDADD = $(LDADDS)

Index: clip-operator-ref.png
===================================================================
RCS file: /cvs/cairo/cairo/test/clip-operator-ref.png,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
Binary files /tmp/cvs9bjOUB and /tmp/cvs4uBa8Y differ

--- NEW FILE: operator-clear-ref.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: operator-clear.c ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: operator-source-ref.png ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: operator-source.c ---
(This appears to be a binary file; contents omitted.)

Index: unbounded-operator-ref.png
===================================================================
RCS file: /cvs/cairo/cairo/test/unbounded-operator-ref.png,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
Binary files /tmp/cvspXnZFF and /tmp/cvsATFGW2 differ

Index: unbounded-operator.c
===================================================================
RCS file: /cvs/cairo/cairo/test/unbounded-operator.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- unbounded-operator.c	8 Aug 2005 20:46:12 -0000	1.1
+++ unbounded-operator.c	18 Aug 2005 22:50:36 -0000	1.2
@@ -124,8 +124,8 @@
 };
 
 static cairo_operator_t operators[] = {
-    CAIRO_OPERATOR_CLEAR, CAIRO_OPERATOR_SOURCE, CAIRO_OPERATOR_IN,
-    CAIRO_OPERATOR_OUT, CAIRO_OPERATOR_DEST_IN, CAIRO_OPERATOR_DEST_ATOP
+    CAIRO_OPERATOR_IN, CAIRO_OPERATOR_OUT,
+    CAIRO_OPERATOR_DEST_IN, CAIRO_OPERATOR_DEST_ATOP
 };
 
 #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))



More information about the cairo-commit mailing list