[Commit] libic/src ic.c, 1.7, 1.8 icbltone.c, 1.2, 1.3 iccompose.c,
1.7, 1.8 icimage.h, 1.10, 1.11 icrop.h, 1.1.1.1, 1.2 icutil.c,
1.2, 1.3
Richard Henderson
commit at keithp.com
Thu Jul 31 03:11:36 PDT 2003
Committed by: rth
Update of /local/src/CVS/libic/src
In directory home.keithp.com:/tmp/cvs-serv28876/src
Modified Files:
ic.c icbltone.c iccompose.c icimage.h icrop.h icutil.c
Log Message:
* src/ic.c: Make everything but IcComposite static.
* src/iccompose.c: Make everything except IcBuildCompositeOperand
and IcCompositeGeneral static.
* src/icbltone.c (Ic8Lane, Ic16Lane, Ic32Lane): Make static.
(IcLaneTable): Turn into a function.
(IcBltOne): Make IcLane const.
(icStipple24Bits): Make static.
* src/icimage.h: Remove lots of now static declarations.
* src/icrop.h: Likewise.
* src/icutil.c (icStipple8Bits, icStipple4Bits): Make static.
(icStipple2Bits, icStipple1Bits): Make static.
(IcStippleTable): Turn into a function.
Index: ic.c
===================================================================
RCS file: /local/src/CVS/libic/src/ic.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ic.c 29 Jul 2003 21:45:20 -0000 1.7
+++ ic.c 31 Jul 2003 09:11:33 -0000 1.8
@@ -58,7 +58,7 @@
(*((a)+2) = (uint8_t) ((v) >> 16))))
#endif
-uint32_t
+static uint32_t
IcOver (uint32_t x, uint32_t y)
{
uint16_t a = ~x >> 24;
@@ -72,7 +72,7 @@
return m|n|o|p;
}
-uint32_t
+static uint32_t
IcOver24 (uint32_t x, uint32_t y)
{
uint16_t a = ~x >> 24;
@@ -85,7 +85,7 @@
return m|n|o;
}
-uint32_t
+static uint32_t
IcIn (uint32_t x, uint8_t y)
{
uint16_t a = y;
@@ -142,7 +142,7 @@
* opSRCxMASKxDST
*/
-void
+static void
IcCompositeSolidMask_nx8x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -200,7 +200,7 @@
}
}
-void
+static void
IcCompositeSolidMask_nx8888x8888C (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -273,7 +273,7 @@
}
}
-void
+static void
IcCompositeSolidMask_nx8x0888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -335,7 +335,7 @@
}
}
-void
+static void
IcCompositeSolidMask_nx8x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -398,7 +398,7 @@
}
}
-void
+static void
IcCompositeSolidMask_nx8888x0565C (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -471,7 +471,7 @@
}
}
-void
+static void
IcCompositeSrc_8888x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -517,7 +517,7 @@
}
}
-void
+static void
IcCompositeSrc_8888x0888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -566,7 +566,7 @@
}
}
-void
+static void
IcCompositeSrc_8888x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -618,7 +618,7 @@
}
}
-void
+static void
IcCompositeSrc_0565x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -654,7 +654,7 @@
}
}
-void
+static void
IcCompositeSrcAdd_8000x8000 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -700,7 +700,7 @@
}
}
-void
+static void
IcCompositeSrcAdd_8888x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -753,7 +753,7 @@
}
}
-void
+static void
IcCompositeSrcAdd_1000x1000 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
@@ -796,7 +796,7 @@
FALSE);
}
-void
+static void
IcCompositeSolidMask_nx1xn (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
Index: icbltone.c
===================================================================
RCS file: /local/src/CVS/libic/src/icbltone.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- icbltone.c 21 Feb 2003 21:34:50 -0000 1.2
+++ icbltone.c 31 Jul 2003 09:11:33 -0000 1.3
@@ -77,7 +77,7 @@
#endif
#if IC_SHIFT == 6
-CARD8 Ic8Lane[256] = {
+static CARD8 const Ic8Lane[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
@@ -94,39 +94,45 @@
242, 243, 244,245,246,247,248,249,250,251,252,253,254,255,
};
-CARD8 Ic16Lane[256] = {
+static CARD8 const Ic16Lane[256] = {
0x00, 0x03, 0x0c, 0x0f,
0x30, 0x33, 0x3c, 0x3f,
0xc0, 0xc3, 0xcc, 0xcf,
0xf0, 0xf3, 0xfc, 0xff,
};
-CARD8 Ic32Lane[16] = {
+static CARD8 const Ic32Lane[16] = {
0x00, 0x0f, 0xf0, 0xff,
};
#endif
#if IC_SHIFT == 5
-CARD8 Ic8Lane[16] = {
+static CARD8 const Ic8Lane[16] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
};
-CARD8 Ic16Lane[16] = {
+static CARD8 const Ic16Lane[16] = {
0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
-CARD8 Ic32Lane[16] = {
+static CARD8 const Ic32Lane[16] = {
0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
#endif
-CARD8 *IcLaneTable[33] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- Ic8Lane, 0, 0, 0, 0, 0, 0, 0,
- Ic16Lane, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- Ic32Lane
-};
+static const CARD8 *
+IcLaneTable(int bpp)
+{
+ switch (bpp) {
+ case 8:
+ return Ic8Lane;
+ case 16:
+ return Ic16Lane;
+ case 32:
+ return Ic32Lane;
+ }
+ return 0;
+}
#endif
void
@@ -163,7 +169,7 @@
int srcinc; /* source units consumed */
Bool endNeedsLoad = FALSE; /* need load for endmask */
#ifndef ICNOPIXADDR
- CARD8 *IcLane;
+ const CARD8 *IcLane;
#endif
int startbyte, endbyte;
@@ -230,11 +236,11 @@
*/
icbits = 0; /* unused */
if (pixelsPerDst <= 8)
- icbits = icStippleTable[pixelsPerDst];
+ icbits = IcStippleTable(pixelsPerDst);
#ifndef ICNOPIXADDR
IcLane = 0;
if (transparent && fgand == 0 && dstBpp >= 8)
- IcLane = IcLaneTable[dstBpp];
+ IcLane = IcLaneTable(dstBpp);
#endif
/*
@@ -450,7 +456,7 @@
#define IcStip24New(rot) (2 + (rot != 0))
#define IcStip24Len 4
-const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
+static const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
/* rotate 0 */
{
C4_24( 0, 0), C4_24( 1, 0), C4_24( 2, 0), C4_24( 3, 0),
@@ -488,7 +494,7 @@
#define IcStip24New(rot) (1 + (rot == 8))
#endif
-const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
+static const IcBits icStipple24Bits[3][1 << IcStip24Len] = {
/* rotate 0 */
{
C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
Index: iccompose.c
===================================================================
RCS file: /local/src/CVS/libic/src/iccompose.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- iccompose.c 29 Jul 2003 21:45:20 -0000 1.7
+++ iccompose.c 31 Jul 2003 09:11:33 -0000 1.8
@@ -38,7 +38,7 @@
* Combine src and mask using IN
*/
-uint32_t
+static uint32_t
IcCombineMaskU (IcCompositeOperand *src,
IcCompositeOperand *msk)
{
@@ -65,7 +65,7 @@
return m|n|o|p;
}
[...1283 lines suppressed...]
{
IcVector v;
@@ -2520,7 +2520,7 @@
return bits;
}
-uint32_t
+static uint32_t
IcFetcha_transform (IcCompositeOperand *op)
{
IcVector v;
@@ -2607,7 +2607,7 @@
return bits;
}
-IcAccessMap icAccessMap[] = {
+static IcAccessMap const icAccessMap[] = {
/* 32bpp formats */
{ PICT_a8r8g8b8, IcFetch_a8r8g8b8, IcFetch_a8r8g8b8, IcStore_a8r8g8b8 },
{ PICT_x8r8g8b8, IcFetch_x8r8g8b8, IcFetch_x8r8g8b8, IcStore_x8r8g8b8 },
Index: icimage.h
===================================================================
RCS file: /local/src/CVS/libic/src/icimage.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- icimage.h 29 Jul 2003 21:45:20 -0000 1.10
+++ icimage.h 31 Jul 2003 09:11:34 -0000 1.11
@@ -319,11 +319,6 @@
IcCompositeOperand *msk,
IcCompositeOperand *dst);
-/*
- * indexed by op
- */
-extern IcCombineFunc icCombineFunc[];
-
typedef struct _IcAccessMap {
uint32_t format;
IcCompositeFetch fetch;
@@ -331,11 +326,6 @@
IcCompositeStore store;
} IcAccessMap;
-/*
- * search on format
- */
-extern IcAccessMap icAccessMap[];
-
/* iccompose.c */
typedef struct _IcCompSrc {
@@ -343,604 +333,6 @@
uint32_t alpha;
} IcCompSrc;
-/*
- * All compositing operators *
- */
-
-uint32_t
-IcCombineMaskU (IcCompositeOperand *src,
- IcCompositeOperand *msk);
-
-IcCompSrc
-IcCombineMaskC (IcCompositeOperand *src,
- IcCompositeOperand *msk);
-
-uint32_t
-IcCombineMaskValueC (IcCompositeOperand *src,
- IcCompositeOperand *msk);
-
-uint32_t
-IcCombineMaskAlphaU (IcCompositeOperand *src,
- IcCompositeOperand *msk);
-
-uint32_t
-IcCombineMaskAlphaC (IcCompositeOperand *src,
- IcCompositeOperand *msk);
-
-
-#if 0
-uint32_t
-IcCombineMask (IcCompositeOperand *src,
- IcCompositeOperand *msk);
-#endif
-
-void
-IcCombineClear (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineSrcU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineSrcC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDst (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOverU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOverC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOverReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOverReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineInU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineInC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineInReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineInReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOutU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOutC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOutReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineOutReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineAtopU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-
-void
-IcCombineAtopC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineAtopReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineAtopReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineXorU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineXorC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-
-void
-IcCombineAddU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineAddC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineSaturateU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineSaturateC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-uint8_t
-IcCombineDisjointOutPart (uint8_t a, uint8_t b);
-
-uint8_t
-IcCombineDisjointInPart (uint8_t a, uint8_t b);
-
-void
-IcCombineDisjointGeneralU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst,
- uint8_t combine);
-
-void
-IcCombineDisjointGeneralC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst,
- uint8_t combine);
-
-void
-IcCombineDisjointOverU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointOverC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointOverReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointOverReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointInU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointInC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointInReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointInReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointOutU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointOutC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-void
-IcCombineDisjointOutReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointOutReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointAtopU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointAtopC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointAtopReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointAtopReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointXorU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineDisjointXorC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-uint8_t
-IcCombineConjointOutPart (uint8_t a, uint8_t b);
-
-uint8_t
-IcCombineConjointInPart (uint8_t a, uint8_t b);
-
-
-void
-IcCombineConjointGeneralU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst,
- uint8_t combine);
-
-void
-IcCombineConjointGeneralC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst,
- uint8_t combine);
-
-void
-IcCombineConjointOverU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointOverC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-void
-IcCombineConjointOverReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointOverReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointInU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointInC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointInReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-
-void
-IcCombineConjointInReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointOutU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointOutC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointOutReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointOutReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointAtopU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointAtopC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointAtopReverseU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-void
-IcCombineConjointAtopReverseC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointXorU (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-void
-IcCombineConjointXorC (IcCompositeOperand *src,
- IcCompositeOperand *msk,
- IcCompositeOperand *dst);
-
-/*
- * All fetch functions
- */
-
-uint32_t
-IcFetch_a8r8g8b8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_x8r8g8b8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a8b8g8r8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_x8b8g8r8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_r8g8b8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_b8g8r8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_r5g6b5 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_b5g6r5 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a1r5g5b5 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_x1r5g5b5 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a1b5g5r5 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_x1b5g5r5 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a4r4g4b4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_x4r4g4b4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a4b4g4r4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_x4b4g4r4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetcha_a8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_r3g3b2 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_b2g3r3 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a2r2g2b2 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a2b2g2r2 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_c8 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetcha_a4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_r1g2b1 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_b1g2r1 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a1r1g1b1 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a1b1g1r1 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_c4 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_a1 (IcCompositeOperand *op);
-
-uint32_t
-IcFetcha_a1 (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_g1 (IcCompositeOperand *op);
-
-void
-IcStore_a8r8g8b8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_x8r8g8b8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a8b8g8r8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_x8b8g8r8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_r8g8b8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_b8g8r8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_r5g6b5 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_b5g6r5 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a1r5g5b5 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_x1r5g5b5 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a1b5g5r5 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_x1b5g5r5 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a4r4g4b4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_x4r4g4b4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a4b4g4r4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_x4b4g4r4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_r3g3b2 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_b2g3r3 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a2r2g2b2 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_c8 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_g8 (IcCompositeOperand *op, uint32_t value);
-
-
-void
-IcStore_a4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_r1g2b1 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_b1g2r1 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a1r1g1b1 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a1b1g1r1 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_c4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_g4 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_a1 (IcCompositeOperand *op, uint32_t value);
-
-void
-IcStore_g1 (IcCompositeOperand *op, uint32_t value);
-
-uint32_t
-IcFetch_external (IcCompositeOperand *op);
-
-uint32_t
-IcFetch_transform (IcCompositeOperand *op);
-
-uint32_t
-IcFetcha_transform (IcCompositeOperand *op);
-
-uint32_t
-IcFetcha_external (IcCompositeOperand *op);
-
-void
-IcStore_external (IcCompositeOperand *op, uint32_t value);
-
-/*
-Bool
-IcBuildOneCompositeOperand (PicturePtr pPict,
- IcCompositeOperand *op,
- int16_t x,
- int16_t y);
-*/
-
Bool
IcBuildCompositeOperand (IcImage *image,
IcCompositeOperand op[4],
@@ -961,198 +353,5 @@
int16_t yDst,
uint16_t width,
uint16_t height);
-
-
-/* icimage.c */
-uint32_t
-IcOver (uint32_t x, uint32_t y);
-
-uint32_t
-IcOver24 (uint32_t x, uint32_t y);
-
-uint32_t
-IcIn (uint32_t x, uint8_t y);
-
-void
-IcCompositeSolidMask_nx8x8888 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSolidMask_nx8x0888 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSolidMask_nx8888x8888C (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSolidMask_nx8x0565 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSolidMask_nx8888x0565C (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrc_8888x8888 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrc_8888x0888 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrc_8888x0565 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrc_0565x0565 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrcAdd_8000x8000 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrcAdd_8888x8888 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSrcAdd_1000x1000 (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
-
-void
-IcCompositeSolidMask_nx1xn (uint8_t op,
- IcImage *iSrc,
- IcImage *iMask,
- IcImage *iDst,
- int16_t xSrc,
- int16_t ySrc,
- int16_t xMask,
- int16_t yMask,
- int16_t xDst,
- int16_t yDst,
- uint16_t width,
- uint16_t height);
#endif /* _IC_MIPICT_H_ */
Index: icrop.h
===================================================================
RCS file: /local/src/CVS/libic/src/icrop.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- icrop.h 21 Feb 2003 14:51:13 -0000 1.1.1.1
+++ icrop.h 31 Jul 2003 09:11:34 -0000 1.2
@@ -101,11 +101,9 @@
extern const IcBits icStipple16Bits[256]; /* half of table */
#define IcStipple16Bits(b) \
(IcStipple16Bits[(b)&0xff] | IcStipple16Bits[(b) >> 8] << IC_HALFUNIT)
-extern const IcBits icStipple8Bits[256];
-extern const IcBits icStipple4Bits[16];
-extern const IcBits icStipple2Bits[4];
-extern const IcBits icStipple1Bits[2];
-extern const IcBits *const icStippleTable[];
+
+extern const IcBits *
+IcStippleTable(int bits);
#define IcStippleRRop(dst, b, fa, fx, ba, bx) \
(IcDoRRop(dst, fa, fx) & b) | (IcDoRRop(dst, ba, bx) & ~b)
Index: icutil.c
===================================================================
RCS file: /local/src/CVS/libic/src/icutil.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- icutil.c 21 Feb 2003 21:34:50 -0000 1.2
+++ icutil.c 31 Jul 2003 09:11:34 -0000 1.3
@@ -100,20 +100,20 @@
#if IC_UNIT == 16
#define IcStipple16Bits 0
#define IcStipple8Bits 0
-const IcBits icStipple4Bits[16] = {
+static const IcBits icStipple4Bits[16] = {
C4( 0,4), C4( 1,4), C4( 2,4), C4( 3,4), C4( 4,4), C4( 5,4),
C4( 6,4), C4( 7,4), C4( 8,4), C4( 9,4), C4( 10,4), C4( 11,4),
C4( 12,4), C4( 13,4), C4( 14,4), C4( 15,4),};
-const IcBits icStipple2Bits[4] = {
+static const IcBits icStipple2Bits[4] = {
C2( 0,8), C2( 1,8), C2( 2,8), C2( 3,8),
};
-const IcBits icStipple1Bits[2] = {
+static const IcBits icStipple1Bits[2] = {
C1( 0,16), C1( 1,16),
};
#endif
#if IC_UNIT == 32
#define icStipple16Bits 0
-const IcBits icStipple8Bits[256] = {
+static const IcBits icStipple8Bits[256] = {
C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4),
C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4),
C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
@@ -158,14 +158,14 @@
C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
C8(252,4), C8(253,4), C8(254,4), C8(255,4),
};
-const IcBits icStipple4Bits[16] = {
+static const IcBits icStipple4Bits[16] = {
C4( 0,8), C4( 1,8), C4( 2,8), C4( 3,8), C4( 4,8), C4( 5,8),
C4( 6,8), C4( 7,8), C4( 8,8), C4( 9,8), C4( 10,8), C4( 11,8),
C4( 12,8), C4( 13,8), C4( 14,8), C4( 15,8),};
-const IcBits icStipple2Bits[4] = {
+static const IcBits icStipple2Bits[4] = {
C2( 0,16), C2( 1,16), C2( 2,16), C2( 3,16),
};
-const IcBits icStipple1Bits[2] = {
+static const IcBits icStipple1Bits[2] = {
C1( 0,32), C1( 1,32),
};
#endif
@@ -215,7 +215,7 @@
C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
C8(252,4), C8(253,4), C8(254,4), C8(255,4),
};
-const IcBits icStipple8Bits[256] = {
+static const IcBits icStipple8Bits[256] = {
C8( 0,8), C8( 1,8), C8( 2,8), C8( 3,8), C8( 4,8), C8( 5,8),
C8( 6,8), C8( 7,8), C8( 8,8), C8( 9,8), C8( 10,8), C8( 11,8),
C8( 12,8), C8( 13,8), C8( 14,8), C8( 15,8), C8( 16,8), C8( 17,8),
@@ -260,23 +260,28 @@
C8(246,8), C8(247,8), C8(248,8), C8(249,8), C8(250,8), C8(251,8),
C8(252,8), C8(253,8), C8(254,8), C8(255,8),
};
-const IcBits icStipple4Bits[16] = {
+static const IcBits icStipple4Bits[16] = {
C4( 0,16), C4( 1,16), C4( 2,16), C4( 3,16), C4( 4,16), C4( 5,16),
C4( 6,16), C4( 7,16), C4( 8,16), C4( 9,16), C4( 10,16), C4( 11,16),
C4( 12,16), C4( 13,16), C4( 14,16), C4( 15,16),};
-const IcBits icStipple2Bits[4] = {
+static const IcBits icStipple2Bits[4] = {
C2( 0,32), C2( 1,32), C2( 2,32), C2( 3,32),
};
#define IcStipple1Bits 0
#endif
-const IcBits * const icStippleTable[] = {
- 0,
- icStipple1Bits,
- icStipple2Bits,
- 0,
- icStipple4Bits,
- 0,
- 0,
- 0,
- icStipple8Bits,
-};
+
+const IcBits *
+IcStippleTable(int bits)
+{
+ switch (bits) {
+ case 1:
+ return icStipple1Bits;
+ case 2:
+ return icStipple2Bits;
+ case 4:
+ return icStipple4Bits;
+ case 8:
+ return icStipple8Bits;
+ }
+ return 0;
+}
More information about the Commit
mailing list