[cairo-commit] cairo/pixman/src Makefile.am, 1.10, 1.11 fbcompose.c, NONE, 1.1 fbpict.h, NONE, 1.1 ic.c, 1.33, 1.34 iccompose.c, 1.28, NONE icimage.h, 1.26, 1.27 pixman-xserver-compat.h, 1.7, 1.8

Billy Biggs commit at pdx.freedesktop.org
Wed Aug 10 21:10:15 PDT 2005


Committed by: vektor

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

Modified Files:
	Makefile.am ic.c icimage.h pixman-xserver-compat.h 
Added Files:
	fbcompose.c fbpict.h 
Removed Files:
	iccompose.c 
Log Message:
	reviewed by: cworth and Jeff Muizelaar at various stages

	* src/fbcompose.c: (PictureTransformPoint3d), (fbFetch_a8r8g8b8),
	(fbFetch_x8r8g8b8), (fbFetch_a8b8g8r8), (fbFetch_x8b8g8r8),
	(fbFetch_r8g8b8), (fbFetch_b8g8r8), (fbFetch_r5g6b5),
	(fbFetch_b5g6r5), (fbFetch_a1r5g5b5), (fbFetch_x1r5g5b5),
	(fbFetch_a1b5g5r5), (fbFetch_x1b5g5r5), (fbFetch_a4r4g4b4),
	(fbFetch_x4r4g4b4), (fbFetch_a4b4g4r4), (fbFetch_x4b4g4r4),
	(fbFetch_a8), (fbFetch_r3g3b2), (fbFetch_b2g3r3),
	(fbFetch_a2r2g2b2), (fbFetch_a2b2g2r2), (fbFetch_c8), (fbFetch_a4),
	(fbFetch_r1g2b1), (fbFetch_b1g2r1), (fbFetch_a1r1g1b1),
	(fbFetch_a1b1g1r1), (fbFetch_c4), (fbFetch_a1), (fbFetch_g1),
	(fetchProcForPicture), (fbFetchPixel_a8r8g8b8),
	(fbFetchPixel_x8r8g8b8), (fbFetchPixel_a8b8g8r8),
	(fbFetchPixel_x8b8g8r8), (fbFetchPixel_r8g8b8),
	(fbFetchPixel_b8g8r8), (fbFetchPixel_r5g6b5),
	(fbFetchPixel_b5g6r5), (fbFetchPixel_a1r5g5b5),
	(fbFetchPixel_x1r5g5b5), (fbFetchPixel_a1b5g5r5),
	(fbFetchPixel_x1b5g5r5), (fbFetchPixel_a4r4g4b4),
	(fbFetchPixel_x4r4g4b4), (fbFetchPixel_a4b4g4r4),
	(fbFetchPixel_x4b4g4r4), (fbFetchPixel_a8), (fbFetchPixel_r3g3b2),
	(fbFetchPixel_b2g3r3), (fbFetchPixel_a2r2g2b2),
	(fbFetchPixel_a2b2g2r2), (fbFetchPixel_c8), (fbFetchPixel_a4),
	(fbFetchPixel_r1g2b1), (fbFetchPixel_b1g2r1),
	(fbFetchPixel_a1r1g1b1), (fbFetchPixel_a1b1g1r1),
	(fbFetchPixel_c4), (fbFetchPixel_a1), (fbFetchPixel_g1),
	(fetchPixelProcForPicture), (fbStore_a8r8g8b8), (fbStore_x8r8g8b8),
	(fbStore_a8b8g8r8), (fbStore_x8b8g8r8), (fbStore_r8g8b8),
	(fbStore_b8g8r8), (fbStore_r5g6b5), (fbStore_b5g6r5),
	(fbStore_a1r5g5b5), (fbStore_x1r5g5b5), (fbStore_a1b5g5r5),
	(fbStore_x1b5g5r5), (fbStore_a4r4g4b4), (fbStore_x4r4g4b4),
	(fbStore_a4b4g4r4), (fbStore_x4b4g4r4), (fbStore_a8),
	(fbStore_r3g3b2), (fbStore_b2g3r3), (fbStore_a2r2g2b2),
	(fbStore_c8), (fbStore_a4), (fbStore_r1g2b1), (fbStore_b1g2r1),
	(fbStore_a1r1g1b1), (fbStore_a1b1g1r1), (fbStore_c4), (fbStore_a1),
	(fbStore_g1), (storeProcForPicture), (fbCombineMaskU),
	(fbCombineClear), (fbCombineSrcU), (fbCombineOverU),
	(fbCombineOverReverseU), (fbCombineInU), (fbCombineInReverseU),
	(fbCombineOutU), (fbCombineOutReverseU), (fbCombineAtopU),
	(fbCombineAtopReverseU), (fbCombineXorU), (fbCombineAddU),
	(fbCombineSaturateU), (fbCombineDisjointOutPart),
	(fbCombineDisjointInPart), (fbCombineDisjointGeneralU),
	(fbCombineDisjointOverU), (fbCombineDisjointInU),
	(fbCombineDisjointInReverseU), (fbCombineDisjointOutU),
	(fbCombineDisjointOutReverseU), (fbCombineDisjointAtopU),
	(fbCombineDisjointAtopReverseU), (fbCombineDisjointXorU),
	(fbCombineConjointOutPart), (fbCombineConjointInPart),
	(fbCombineConjointGeneralU), (fbCombineConjointOverU),
	(fbCombineConjointOverReverseU), (fbCombineConjointInU),
	(fbCombineConjointInReverseU), (fbCombineConjointOutU),
	(fbCombineConjointOutReverseU), (fbCombineConjointAtopU),
	(fbCombineConjointAtopReverseU), (fbCombineConjointXorU),
	(fbCombineMaskC), (fbCombineMaskValueC), (fbCombineMaskAlphaC),
	(fbCombineClearC), (fbCombineSrcC), (fbCombineOverC),
	(fbCombineOverReverseC), (fbCombineInC), (fbCombineInReverseC),
	(fbCombineOutC), (fbCombineOutReverseC), (fbCombineAtopC),
	(fbCombineAtopReverseC), (fbCombineXorC), (fbCombineAddC),
	(fbCombineSaturateC), (fbCombineDisjointGeneralC),
	(fbCombineDisjointOverC), (fbCombineDisjointInC),
	(fbCombineDisjointInReverseC), (fbCombineDisjointOutC),
	(fbCombineDisjointOutReverseC), (fbCombineDisjointAtopC),
	(fbCombineDisjointAtopReverseC), (fbCombineDisjointXorC),
	(fbCombineConjointGeneralC), (fbCombineConjointOverC),
	(fbCombineConjointOverReverseC), (fbCombineConjointInC),
	(fbCombineConjointInReverseC), (fbCombineConjointOutC),
	(fbCombineConjointOutReverseC), (fbCombineConjointAtopC),
	(fbCombineConjointAtopReverseC), (fbCombineConjointXorC),
	(fbFetchSolid), (fbFetch), (gradientPixel), (fbFetchSourcePict),
	(fbFetchTransformed), (fbFetchExternalAlpha), (fbStore),
	(fbStoreExternalAlpha), (fbCompositeRect),
	(pixman_compositeGeneral): Port fbcompose.c from xserver into
	pixman.  Add #defines for gradients, convolution filters, and
	indexed colour formats to keep the patch small.  Use pixman
	regions instead of X server regions as appropriate.

	* src/iccompose.c: Remove iccompose.c, replaced by fbcompose.c.

	* src/fbpict.h: Add a slightly-trimmed version of fbpict.h from
	xserver/fb to make the port smaller and cleaner.
	* src/ic.c: Use the redundant fbpict.h defines and add in the
	struct for indexed colour support.
	* src/icimage.h: Remove defines now in fbpict.h.
	* src/pixman-xserver-compat.h: Add some constants and types
	required by fbcompose.c

	* src/Makefile.am: Add fbcompose.c and fbpict.h, remove iccompose.c.



Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Makefile.am	10 Aug 2005 19:36:51 -0000	1.10
+++ Makefile.am	11 Aug 2005 04:10:13 -0000	1.11
@@ -6,11 +6,11 @@
 	pixman-xserver-compat.h \
 	pixregion.c \
 	pixregionint.h \
+	fbpict.h \
 	ic.c \
 	icblt.c \
 	icbltone.c \
 	iccolor.c \
-	iccompose.c \
 	icformat.c \
 	icimage.c \
 	icimage.h \
@@ -26,6 +26,7 @@
 	fbedge.c \
 	fbedgeimp.h \
 	fbtrap.c \
+	fbcompose.c \
 	renderedge.c \
 	renderedge.h \
 	slim_internal.h

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

--- NEW FILE: fbpict.h ---
(This appears to be a binary file; contents omitted.)

Index: ic.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/ic.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- ic.c	5 Aug 2005 18:44:49 -0000	1.33
+++ ic.c	11 Aug 2005 04:10:13 -0000	1.34
@@ -22,6 +22,7 @@
  */
 
 #include "pixman-xserver-compat.h"
+#include "fbpict.h"
 
 #define cvt8888to0565(s)    ((((s) >> 3) & 0x001f) | \
 			     (((s) >> 5) & 0x07e0) | \
@@ -105,51 +106,6 @@
     return m|n|o|p;
 }
 
-#define fbComposeGetSolid(image, bits) { \
-    FbBits	*__bits__; \
-    FbStride	__stride__; \
-    int		__bpp__; \
-    int		__xoff__,__yoff__; \
-\
-    FbGetPixels((image)->pixels,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
-    switch (__bpp__) { \
-    case 32: \
-	(bits) = *(CARD32 *) __bits__; \
-	break; \
-    case 24: \
-	(bits) = Fetch24 ((CARD8 *) __bits__); \
-	break; \
-    case 16: \
-	(bits) = *(CARD16 *) __bits__; \
-	(bits) = cvt0565to0888(bits); \
-	break; \
-    case 8: \
-	(bits) = *(CARD8 *) __bits__; \
-	(bits) = (bits) << 24; \
-	break; \
-    case 1: \
-	(bits) = *(CARD32 *) __bits__; \
-	(bits) = FbLeftStipBits((bits),1) ? 0xff000000 : 0x00000000;\
-	break; \
-    default: \
-	return; \
-    } \
-    /* manage missing src alpha */ \
-    if ((image)->image_format.alphaMask == 0) \
-	(bits) |= 0xff000000; \
-}
-
-#define fbComposeGetStart(image,x,y,type,stride,line,mul) {\
-    FbBits	*__bits__; \
-    FbStride	__stride__; \
-    int		__bpp__; \
-    int		__xoff__,__yoff__; \
-\
-    FbGetPixels((image)->pixels,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
-    (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \
-    (line) = ((type *) __bits__) + (stride) * ((y) + __yoff__) + (mul) * ((x) + __xoff__); \
-}
-
 #define genericCombine24(a,b,c,d) (((a)*(c)+(b)*(d)))
 
 /*

--- iccompose.c DELETED ---

Index: icimage.h
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icimage.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- icimage.h	25 Jun 2005 03:13:19 -0000	1.26
+++ icimage.h	11 Aug 2005 04:10:13 -0000	1.27
@@ -33,38 +33,6 @@
 #include "resource.h"
 */
 
-
-#define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
-#define FbIntDiv(a,b)	 (((uint16_t) (a) * 255) / (b))
-
-#define FbGet8(v,i)   ((uint16_t) (uint8_t) ((v) >> i))
-
-/*
- * There are two ways of handling alpha -- either as a single unified value or
- * a separate value for each component, hence each macro must have two
- * versions.  The unified alpha version has a 'U' at the end of the name,
- * the component version has a 'C'.  Similarly, functions which deal with
- * this difference will have two versions using the same convention.
- */
-
-#define FbOverU(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i),\
-			   (uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
-
-#define FbOverC(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i),\
-			    (uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
-
-#define FbInU(x,i,a,t) ((uint32_t) FbIntMult(FbGet8(x,i),(a),(t)) << (i))
-
-#define FbInC(x,i,a,t) ((uint32_t) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i))
-
-#define FbGen(x,y,i,ax,ay,t,u,v) ((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \
-					 FbIntMult(FbGet8(x,i),ax,(v))),\
-				  (uint32_t) ((uint8_t) ((t) | \
-						     (0 - ((t) >> 8)))) << (i))
-
-#define FbAdd(x,y,i,t)	((t) = FbGet8(x,i) + FbGet8(y,i), \
-			 (uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
-
 /*
 typedef struct _IndexFormat {
     VisualPtr	    pVisual; 
@@ -138,13 +106,12 @@
 typedef uint8_t FbIndexType;
 #endif
 
-/* XXX: We're not supporting indexed operations, right?
+/* XXX: We're not supporting indexed operations, right? */
 typedef struct _FbIndexed {
     int	color;
     uint32_t	rgba[IC_MAX_INDEXED];
     FbIndexType	ent[32768];
 } FbIndexedRec, *FbIndexedPtr;
-*/
 
 #define FbCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
 			     (((s) >> 6) & 0x03e0) | \

Index: pixman-xserver-compat.h
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/pixman-xserver-compat.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pixman-xserver-compat.h	5 Aug 2005 19:26:33 -0000	1.7
+++ pixman-xserver-compat.h	11 Aug 2005 04:10:13 -0000	1.8
@@ -86,6 +86,22 @@
     (yoff) = 0; \
 }
 
+/* Extended repeat attributes included in 0.10 */
+#define RepeatNone                          0
+#define RepeatNormal                        1
+#define RepeatPad                           2
+#define RepeatReflect                       3
+
+typedef pixman_vector_t PictVector;
+typedef pixman_vector_t* PictVectorPtr;
+
+#define miIndexedPtr FbIndexedPtr
+#define miIndexToEnt24 FbIndexToEnt24
+#define miIndexToEntY24 FbIndexToEntY24
+
+#define MAX_FIXED_48_16	    ((xFixed_48_16) 0x7fffffff)
+#define MIN_FIXED_48_16	    (-((xFixed_48_16) 1 << 31))
+
 /* Then, include any header files that have been copied directly
  * from xserver. */
 




More information about the cairo-commit mailing list