[cairo-commit] cairo/test Makefile.am, 1.72, 1.73 clip-operator.c, NONE, 1.1 composite-integer-translate-over-repeat.c, 1.2, 1.3 unbounded-operator.c, NONE, 1.1

Owen Taylor commit at pdx.freedesktop.org
Mon Aug 8 13:46:14 PDT 2005


Committed by: otaylor

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

Modified Files:
	Makefile.am composite-integer-translate-over-repeat.c 
Added Files:
	clip-operator.c unbounded-operator.c 
Log Message:
2005-08-08  Owen Taylor  <otaylor at redhat.com>

	* src/cairo-gstate.c (_cairo_operator_bounded): Add a function to test
	whether a cairo_operator_t is bounded (does nothing for 0 src/mask)

	* src/cairo-surface.c (_cairo_surface_composite_fixup_unbounded) cairoint.h:
	Add a helper function to take clearing areas that are outside the source/mask
	but are cleared by unbounded operations.

	* src/cairo-image-surface.c (_cairo_image_surface_composite)
	src/cairo-xlib-surface.c (_cairo_xlib_surface_composite): Use 
	_cairo_surface_composite_fixup_unbounded() as needed.

	* src/cairo-image-surface.c src/cairint.h: Keep track of whether the surface 
	has a clip or not ... we need this for determining when we can bypass
	an intermediate mask for composite_trapezoids().

	* src/cairo-image-surface.c (_cairo_image_surface_composite_trapezoids):
	Create an intermediate mask of the right size with pixman_add_trapezoids()
	and composite that.

	* src/cairo-xlib-surface.c (_cairo_xlib_surface_composite_trapezoids):
	When rendering with an unbounded operator, create the intermediate mask
	ourselves and render with ADD to that, then composite the result.

	* src/cairo-ft-font.c (_cairo_ft_scaled_font_show_glyphs): Create an 
	intermediate surface the size of the extents, render the glyphs to that
	then composite the results.

	* src/cairo-xlib-surface.c (glyphset_cache_entry_t): Add the size of the glyph

	* src/cairo-xlib-surface.c (_show_glyphs_fixup_unbounded): Compute the size
	of the glyph mask, then use _cairo_surface_composite_fixup_unbounded().

	* src/cairo-xlib-surface.c (_cairo_xlib_surface_show_glyphs32): Use the right
	mask format. (Unrelated bugfix)

	* src/cairo-gstate.c (_cairo_gstate_clip_and_composite): New function taking
	a drawing function as a parameter to encapsulate shared logic between
	compositing trapezoid, glyphs, and masks.

	* src/cairo-gstate.c (_cairo_gstate_mask, 
	_cairo_surface_clip_and_composite_trapezoids, _cairo_gstate_show_glyphs):
	Use _cairo_gstate_clip_and_composite(). Also fix extents computations for 
	unbounded operators.
	
	* src/cairo-clip.c src/cairo-clip-private.h (_cairo_clip_combine_to_surface): 
	Add the destination as an extra parameter to allow combining to an intermediate
	surface.

	* tests/unbounded-operator.c tests/Makefile.am: Add a test for the
	operation of the 6 unbounded operators against different shapes.

	* tests/clip-operator.c tests/Makefile.am: Add a test that tests
	surface clipping with different shapes against all the operators.

	* test/composite-integer-translate-over-repeat.c (draw): Make use OVER
	like the name and description. With fixed semantics, SOURCE does something
	different.

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/test/Makefile.am,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- Makefile.am	5 Aug 2005 22:07:46 -0000	1.72
+++ Makefile.am	8 Aug 2005 20:46:12 -0000	1.73
@@ -2,6 +2,7 @@
 TESTS = 			\
 a8-mask				\
 clip-nesting			\
+clip-operator			\
 clip-twice			\
 composite-integer-translate-source \
 composite-integer-translate-over \
@@ -41,6 +42,7 @@
 transforms			\
 translate-show-surface		\
 trap-clip			\
+unbounded-operator		\
 user-data			\
 rel-path
 
@@ -62,6 +64,7 @@
 EXTRA_DIST =				\
 a8-mask.png				\
 clip-nesting-ref.png			\
+clip-operator-ref.png			\
 clip-twice-ref.png			\
 composite-integer-translate-source-ref.png		\
 composite-integer-translate-over-ref.png		\
@@ -96,6 +99,7 @@
 transforms-ref.png			\
 translate-show-surface-ref.png		\
 trap-clip-ref.png			\
+unbounded-operator-ref.png		\
 rel-path-ref.png
 
 # Any test for which the code committed to CVS is expected to fail
@@ -153,6 +157,7 @@
 # from autogen.sh. My, but this is painful...
 a8_mask_LDADD = $(LDADDS)
 clip_nesting_LDADD = $(LDADDS)
+clip_operator_LDADD = $(LDADDS)
 clip_twice_LDADD = $(LDADDS)
 composite_integer_translate_source_LDADD = $(LDADDS)
 composite_integer_translate_over_LDADD = $(LDADDS)
@@ -195,6 +200,7 @@
 transforms_LDADD = $(LDADDS)
 translate_show_surface_LDADD = $(LDADDS)
 trap_clip_LDADD = $(LDADDS)
+unbounded_operator_LDADD = $(LDADDS)
 user_data_LDADD = $(LDADDS)
 rel_path_LDADD = $(LDADDS)
 xlib_surface_LDADD = $(LDADDS)

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

Index: composite-integer-translate-over-repeat.c
===================================================================
RCS file: /cvs/cairo/cairo/test/composite-integer-translate-over-repeat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- composite-integer-translate-over-repeat.c	18 Jul 2005 15:23:21 -0000	1.2
+++ composite-integer-translate-over-repeat.c	8 Aug 2005 20:46:12 -0000	1.3
@@ -44,7 +44,7 @@
     cairo_fill (cr);
 
     cairo_translate (cr, OFFSET, OFFSET);
-    cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+    cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
     cairo_set_source (cr, pat);
     cairo_rectangle (cr, 0, 0, SIZE - OFFSET, SIZE - OFFSET);
     cairo_fill (cr);

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




More information about the cairo-commit mailing list