[PATCH] make some stuff in xserver/fb/fbpict.c static]
Jeff Muizelaar
jeff at infidigm.net
Sat Jun 25 19:56:47 PDT 2005
The following patch makes a number of the functions in fbpict.c static
too help with the libpixman merging. It moves fbCompositeSrcSrc_nxn
above its callers so they don't need a prototype and also adds a
warning over fbIn24 not being used. I don't know how that
should be dealt with...
-Jeff
Index: fb/fbpict.c
===================================================================
RCS file: /cvs/xserver/xserver/fb/fbpict.c,v
retrieving revision 1.37
diff -u -r1.37 fbpict.c
--- fb/fbpict.c 13 Jun 2005 08:00:58 -0000 1.37
+++ fb/fbpict.c 26 Jun 2005 02:42:26 -0000
@@ -48,7 +48,7 @@
CARD16 width,
CARD16 height);
-CARD32
+static CARD32
fbOver (CARD32 x, CARD32 y)
{
CARD16 a = ~x >> 24;
@@ -62,7 +62,7 @@
return m|n|o|p;
}
-CARD32
+static CARD32
fbOver24 (CARD32 x, CARD32 y)
{
CARD16 a = ~x >> 24;
@@ -75,7 +75,7 @@
return m|n|o;
}
-CARD32
+static CARD32
fbIn (CARD32 x, CARD8 y)
{
CARD16 a = y;
@@ -89,7 +89,7 @@
return m|n|o|p;
}
-CARD32
+static CARD32
fbIn24 (CARD32 x, CARD8 y)
{
CARD16 a = y;
@@ -165,7 +165,7 @@
* opSRCxMASKxDST
*/
-void
+static void
fbCompositeSolidMask_nx8x8888 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -223,7 +223,7 @@
}
}
-void
+static void
fbCompositeSolidMask_nx8888x8888C (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -297,7 +297,7 @@
}
#define srcAlphaCombine24(a,b) genericCombine24(a,b,srca,srcia)
-void
+static void
fbCompositeSolidMask_nx8x0888 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -392,7 +392,7 @@
}
}
-void
+static void
fbCompositeSolidMask_nx8x0565 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -469,7 +469,7 @@
}
}
-void
+static void
fbCompositeSolidMask_nx8888x0565 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -548,7 +548,7 @@
}
}
-void
+static void
fbCompositeSolidMask_nx8888x0565C (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -621,7 +621,7 @@
}
}
-void
+static void
fbCompositeSrc_8888x8888 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -667,7 +667,7 @@
}
}
-void
+static void
fbCompositeSrc_8888x0888 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -716,7 +716,7 @@
}
}
-void
+static void
fbCompositeSrc_8888x0565 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -768,7 +768,7 @@
}
}
-void
+static void
fbCompositeSrcAdd_8000x8000 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -818,7 +818,7 @@
}
}
-void
+static void
fbCompositeSrcAdd_8888x8888 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -875,7 +875,7 @@
}
}
-void
+static void
fbCompositeSrcAdd_1000x1000 (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -918,7 +918,7 @@
FALSE);
}
-void
+static void
fbCompositeSolidMask_nx1xn (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -983,10 +983,60 @@
}
/*
+ * Simple bitblt
+ */
+
+static void
+fbCompositeSrcSrc_nxn (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst,
+ CARD16 width,
+ CARD16 height)
+{
+ FbBits *dst;
+ FbBits *src;
+ FbStride dstStride, srcStride;
+ int srcXoff, srcYoff;
+ int dstXoff, dstYoff;
+ int srcBpp;
+ int dstBpp;
+ Bool reverse = FALSE;
+ Bool upsidedown = FALSE;
+
+ fbGetDrawable(pSrc->pDrawable,src,srcStride,srcBpp,srcXoff,srcYoff);
+ fbGetDrawable(pDst->pDrawable,dst,dstStride,dstBpp,dstXoff,dstYoff);
+
+ fbBlt (src + (ySrc + srcYoff) * srcStride,
+ srcStride,
+ (xSrc + srcXoff) * srcBpp,
+
+ dst + (yDst + dstYoff) * dstStride,
+ dstStride,
+ (xDst + dstXoff) * dstBpp,
+
+ (width) * dstBpp,
+ (height),
+
+ GXcopy,
+ FB_ALLONES,
+ dstBpp,
+
+ reverse,
+ upsidedown);
+}
+
+/*
* Apply a constant alpha value in an over computation
*/
-void
+static void
fbCompositeTrans_0565xnx0565(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -1090,7 +1140,7 @@
/* macros for "i can't believe it's not fast" packed pixel handling */
#define alphamaskCombine24(a,b) genericCombine24(a,b,maskAlpha,maskiAlpha)
-void
+static void
fbCompositeTrans_0888xnx0888(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
@@ -1271,57 +1321,6 @@
}
}
}
-
-/*
- * Simple bitblt
- */
-
-void
-fbCompositeSrcSrc_nxn (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
-{
- FbBits *dst;
- FbBits *src;
- FbStride dstStride, srcStride;
- int srcXoff, srcYoff;
- int dstXoff, dstYoff;
- int srcBpp;
- int dstBpp;
- Bool reverse = FALSE;
- Bool upsidedown = FALSE;
-
- fbGetDrawable(pSrc->pDrawable,src,srcStride,srcBpp,srcXoff,srcYoff);
- fbGetDrawable(pDst->pDrawable,dst,dstStride,dstBpp,dstXoff,dstYoff);
-
- fbBlt (src + (ySrc + srcYoff) * srcStride,
- srcStride,
- (xSrc + srcXoff) * srcBpp,
-
- dst + (yDst + dstYoff) * dstStride,
- dstStride,
- (xDst + dstXoff) * dstBpp,
-
- (width) * dstBpp,
- (height),
-
- GXcopy,
- FB_ALLONES,
- dstBpp,
-
- reverse,
- upsidedown);
-}
-
/*
* Solid fill
void
Index: fb/fbpict.h
===================================================================
RCS file: /cvs/xserver/xserver/fb/fbpict.h,v
retrieving revision 1.22
diff -u -r1.22 fbpict.h
--- fb/fbpict.h 27 May 2005 14:15:13 -0000 1.22
+++ fb/fbpict.h 26 Jun 2005 02:42:26 -0000
@@ -304,256 +304,6 @@
xFixed b);
/* fbpict.c */
-CARD32
-fbOver (CARD32 x, CARD32 y);
-
-CARD32
-fbOver24 (CARD32 x, CARD32 y);
-
-CARD32
-fbIn (CARD32 x, CARD8 y);
-
-CARD32
-fbIn24 (CARD32 x, CARD8 y);
-
-void
-fbCompositeSolidMask_nx8x8888 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSolidMask_nx8x0888 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSolidMask_nx8888x8888C (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSolidMask_nx8x0565 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSolidMask_nx8888x0565 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSolidMask_nx8888x0565C (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrc_8888x8888 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrc_8888x0888 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrc_8888x0565 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrc_0565x0565 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrcAdd_8000x8000 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrcAdd_8888x8888 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrcAdd_1000x1000 (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSolidMask_nx1xn (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeTrans_0565xnx0565(CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeTrans_0888xnx0888(CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
-void
-fbCompositeSrcSrc_nxn (CARD8 op,
- PicturePtr pSrc,
- PicturePtr pMask,
- PicturePtr pDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
-
void
fbComposite (CARD8 op,
PicturePtr pSrc,
----- End forwarded message -----
More information about the xorg
mailing list