[cairo-commit] cairo/pixman/src Makefile.am, 1.11, 1.12 fbmmx.c, NONE, 1.1 fbmmx.h, NONE, 1.1 fbpict.c, NONE, 1.1 ic.c, 1.34, NONE icint.h, 1.38, 1.39

Billy Biggs commit at pdx.freedesktop.org
Tue Aug 16 16:50:27 PDT 2005


Committed by: vektor

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

Modified Files:
	Makefile.am icint.h 
Added Files:
	fbmmx.c fbmmx.h fbpict.c 
Removed Files:
	ic.c 
Log Message:
	* src/fbmmx.c: (shift), (negate), (pix_multiply), (pix_add),
	(expand_alpha), (expand_alpha_rev), (invert_colors), (over),
	(over_rev_non_pre), (in), (in_over), (load8888), (pack8888),
	(store8888), (expand565), (expand8888), (pack565), (pix_add_mul),
	(mmxCombineMaskU), (mmxCombineOverU), (mmxCombineOverReverseU),
	(mmxCombineInU), (mmxCombineInReverseU), (mmxCombineOutU),
	(mmxCombineOutReverseU), (mmxCombineAtopU),
	(mmxCombineAtopReverseU), (mmxCombineXorU), (mmxCombineAddU),
	(mmxCombineSaturateU), (mmxCombineSrcC), (mmxCombineOverC),
	(mmxCombineOverReverseC), (mmxCombineInC), (mmxCombineInReverseC),
	(mmxCombineOutC), (mmxCombineOutReverseC), (mmxCombineAtopC),
	(mmxCombineAtopReverseC), (mmxCombineXorC), (mmxCombineAddC),
	(fbComposeSetupMMX), (fbCompositeSolid_nx8888mmx),
	(fbCompositeSolid_nx0565mmx),
	(fbCompositeSolidMask_nx8888x8888Cmmx),
	(fbCompositeSrc_8888x8x8888mmx), (fbCompositeSrc_x888x8x8888mmx),
	(fbCompositeSolidMask_nx8x8888mmx),
	(fbCompositeSolidMaskSrc_nx8x8888mmx),
	(fbCompositeSolidMask_nx8x0565mmx),
	(fbCompositeSrc_8888RevNPx0565mmx),
	(fbCompositeSrc_8888RevNPx8888mmx),
	(fbCompositeSolidMask_nx8888x0565Cmmx),
	(fbCompositeSrcAdd_8000x8000mmx), (fbCompositeSrcAdd_8888x8888mmx),
	(fbSolidFillmmx), (fbCopyAreammx), (fbCompositeCopyAreammx),
	(detectCPUFeatures), (fbHaveMMX):
	* src/fbmmx.h: Port MMX code from xserver to pixman.

	* src/fbpict.c: (fbOver), (fbOver24), (fbIn), (fbIn24),
	(fbCompositeSolidMask_nx8x8888),
	(fbCompositeSolidMask_nx8888x8888C),
	(fbCompositeSolidMask_nx8x0888), (fbCompositeSolidMask_nx8x0565),
	(fbCompositeSolidMask_nx8888x0565),
	(fbCompositeSolidMask_nx8888x0565C), (fbCompositeSrc_8888x8888),
	(fbCompositeSrc_8888x0888), (fbCompositeSrc_8888x0565),
	(fbCompositeSrcAdd_8000x8000), (fbCompositeSrcAdd_8888x8888),
	(fbCompositeSrcAdd_1000x1000), (fbCompositeSolidMask_nx1xn),
	(fbCompositeTrans_0565xnx0565), (fbCompositeTrans_0888xnx0888),
	(fbCompositeSrcSrc_nxn), (pixman_composite): Add an fbpict.c ported
	from the latest in xserver/fb, including hooks to the MMX code
	where appropriate.  This replaces the old ic.c file.

	* src/ic.c: Replaced by fbpict.c.

	* src/icint.h: Move some X server macros from fbpict.c up into
	icint.h to keep the diff small.

	* src/Makefile.am: Add fbmmx and fbpict.c, remove ic.c.

	* configure.in: Add a check for the MMX intrinsics.  gcc >= 3.4
	is required.



Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Makefile.am	11 Aug 2005 04:10:13 -0000	1.11
+++ Makefile.am	16 Aug 2005 23:50:25 -0000	1.12
@@ -7,7 +7,7 @@
 	pixregion.c \
 	pixregionint.h \
 	fbpict.h \
-	ic.c \
+	fbpict.c \
 	icblt.c \
 	icbltone.c \
 	iccolor.c \
@@ -31,4 +31,10 @@
 	renderedge.h \
 	slim_internal.h
 
-INCLUDES = -I$(top_srcdir) -I$(srcdir) $(WARN_CFLAGS)
+if USE_MMX
+libpixman_la_SOURCES += \
+	fbmmx.c		\
+	fbmmx.h
+endif
+
+INCLUDES = -I$(top_srcdir) -I$(srcdir) $(WARN_CFLAGS) @MMX_CFLAGS@

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

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

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

--- ic.c DELETED ---

Index: icint.h
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icint.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- icint.h	10 Aug 2005 19:36:51 -0000	1.38
+++ icint.h	16 Aug 2005 23:50:25 -0000	1.39
@@ -1071,4 +1071,34 @@
 
 #endif /* _PICTURE_H_ */
 
+
+/* Macros needed by fbpict.c */
+
+#define cvt8888to0565(s)    ((((s) >> 3) & 0x001f) | \
+			     (((s) >> 5) & 0x07e0) | \
+			     (((s) >> 8) & 0xf800))
+#define cvt0565to0888(s)    (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
+			     ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
+			     ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
+		     ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
+		     ((*((CARD16 *) (a)) << 8) | *((a)+2)))
+#define Store24(a,v) ((unsigned long) (a) & 1 ? \
+		      ((*(a) = (CARD8) ((v) >> 16)), \
+		       (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
+		      ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
+		       (*((a)+2) = (CARD8) (v))))
+#else
+#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
+		     ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
+		     ((*((CARD16 *) (a))) | (*((a)+2) << 16)))
+#define Store24(a,v) ((unsigned long) (a) & 1 ? \
+		      ((*(a) = (CARD8) (v)), \
+		       (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
+		      ((*((CARD16 *) (a)) = (CARD16) (v)),\
+		       (*((a)+2) = (CARD8) ((v) >> 16))))
+#endif
+
 #endif /* _ICINT_H_ */



More information about the cairo-commit mailing list