[cairo-commit] cairo/pixman/src icimage.c, 1.32, 1.33 icrect.c, 1.19, 1.20 pixman.h, 1.23, 1.24

Billy Biggs commit at pdx.freedesktop.org
Sun Oct 9 09:09:55 PDT 2005


Committed by: vektor

Update of /cvs/cairo/cairo/pixman/src
In directory gabe:/tmp/cvs-serv31374/src

Modified Files:
	icimage.c icrect.c pixman.h 
Log Message:
2005-10-09  Billy Biggs  <vektor at dumbterm.net>

	reviewed by: davidr, cworth, otaylor

	* src/pixman.h: Add extended repeat modes, copied from XRender.
	* src/icimage.c: (pixman_image_init), (pixman_image_set_repeat),
	(FbClipImageSrc): Cleanup to use the new repeat modes.
	* src/icrect.c: (pixman_fill_rectangles): Be explicit about which
	repeat mode we want.



Index: icimage.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icimage.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- icimage.c	28 Aug 2005 02:32:57 -0000	1.32
+++ icimage.c	9 Oct 2005 16:09:53 -0000	1.33
@@ -105,7 +105,7 @@
 pixman_image_init (pixman_image_t *image)
 {
     image->refcnt = 1;
-    image->repeat = 0;
+    image->repeat = PIXMAN_REPEAT_NONE;
     image->graphicsExposures = 0;
     image->subWindowMode = ClipByChildren;
     image->polyEdge = PolyEdgeSharp;
@@ -199,8 +199,8 @@
 }
 
 void
-pixman_image_set_repeat (pixman_image_t	*image,
-		  int		repeat)
+pixman_image_set_repeat (pixman_image_t		*image,
+			 pixman_repeat_t	repeat)
 {
     if (image)
 	image->repeat = repeat;
@@ -377,7 +377,8 @@
     /* XXX what to do with clipping from transformed pictures? */
     if (image->transform)
 	return 1;
-    if (image->repeat)
+    /* XXX davidr hates this, wants to never use source-based clipping */
+    if (image->repeat != PIXMAN_REPEAT_NONE)
     {
 	/* XXX no source clipping */
 	if (image->compositeClipSource &&

Index: icrect.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icrect.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- icrect.c	28 Aug 2005 02:32:57 -0000	1.19
+++ icrect.c	9 Oct 2005 16:09:53 -0000	1.20
@@ -346,7 +346,7 @@
 	if (!src)
 	    goto bail2;
 
-	pixman_image_set_repeat (src, 1);
+	pixman_image_set_repeat (src, PIXMAN_REPEAT_NORMAL);
 
 	while (nRects--)
 	{

Index: pixman.h
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/pixman.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- pixman.h	7 Sep 2005 23:57:59 -0000	1.23
+++ pixman.h	9 Oct 2005 16:09:53 -0000	1.24
@@ -348,9 +348,17 @@
 pixman_image_set_transform (pixman_image_t	*image,
 			    pixman_transform_t	*transform);
 
+/* Don't blame me, blame XRender */
+typedef enum {
+    PIXMAN_REPEAT_NONE,
+    PIXMAN_REPEAT_NORMAL,
+    PIXMAN_REPEAT_PAD,
+    PIXMAN_REPEAT_REFLECT
+} pixman_repeat_t;
+
 void
-pixman_image_set_repeat (pixman_image_t	*image,
-			 int		repeat);
+pixman_image_set_repeat (pixman_image_t		*image,
+			 pixman_repeat_t	repeat);
 
 void
 pixman_image_set_filter (pixman_image_t		*image,



More information about the cairo-commit mailing list