summaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2003-07-29 14:45:20 +0000
committerCarl Worth <cworth@cworth.org>2003-07-29 14:45:20 +0000
commitf605294dd31feb88261d4629ddd9cb7e8793c60f (patch)
treedd3fb7d5076392ba325d2e5d3875c7f7be748134 /pixman
parent47844ba222600301bf46c521fc84d27e93586bc7 (diff)
Replaced CARD*/INT* datatypes with stdint types (vektor@dumbterm.net).
Diffstat (limited to 'pixman')
-rw-r--r--pixman/src/ic.c456
-rw-r--r--pixman/src/ic.h28
-rw-r--r--pixman/src/iccompose.c828
-rw-r--r--pixman/src/icimage.h534
-rw-r--r--pixman/src/icint.h152
5 files changed, 999 insertions, 999 deletions
diff --git a/pixman/src/ic.c b/pixman/src/ic.c
index 13df18db..78647049 100644
--- a/pixman/src/ic.c
+++ b/pixman/src/ic.c
@@ -40,30 +40,30 @@
#if IMAGE_BYTE_ORDER == MSBFirst
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
- ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
- ((*((CARD16 *) (a)) << 8) | *((a)+2)))
+ ((*(a) << 16) | *((uint16_t *) ((a)+1))) : \
+ ((*((uint16_t *) (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))))
+ ((*(a) = (uint8_t) ((v) >> 16)), \
+ (*((uint16_t *) ((a)+1)) = (uint16_t) (v))) : \
+ ((*((uint16_t *) (a)) = (uint16_t) ((v) >> 8)), \
+ (*((a)+2) = (uint8_t) (v))))
#else
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
- ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
- ((*((CARD16 *) (a))) | (*((a)+2) << 16)))
+ ((*(a)) | (*((uint16_t *) ((a)+1)) << 8)) : \
+ ((*((uint16_t *) (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))))
+ ((*(a) = (uint8_t) (v)), \
+ (*((uint16_t *) ((a)+1)) = (uint16_t) ((v) >> 8))) : \
+ ((*((uint16_t *) (a)) = (uint16_t) (v)),\
+ (*((a)+2) = (uint8_t) ((v) >> 16))))
#endif
-CARD32
-IcOver (CARD32 x, CARD32 y)
+uint32_t
+IcOver (uint32_t x, uint32_t y)
{
- CARD16 a = ~x >> 24;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint16_t a = ~x >> 24;
+ uint16_t t;
+ uint32_t m,n,o,p;
m = IcOverU(x,y,0,a,t);
n = IcOverU(x,y,8,a,t);
@@ -72,12 +72,12 @@ IcOver (CARD32 x, CARD32 y)
return m|n|o|p;
}
-CARD32
-IcOver24 (CARD32 x, CARD32 y)
+uint32_t
+IcOver24 (uint32_t x, uint32_t y)
{
- CARD16 a = ~x >> 24;
- CARD16 t;
- CARD32 m,n,o;
+ uint16_t a = ~x >> 24;
+ uint16_t t;
+ uint32_t m,n,o;
m = IcOverU(x,y,0,a,t);
n = IcOverU(x,y,8,a,t);
@@ -85,12 +85,12 @@ IcOver24 (CARD32 x, CARD32 y)
return m|n|o;
}
-CARD32
-IcIn (CARD32 x, CARD8 y)
+uint32_t
+IcIn (uint32_t x, uint8_t y)
{
- CARD16 a = y;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint16_t a = y;
+ uint16_t t;
+ uint32_t m,n,o,p;
m = IcInU(x,0,a,t);
n = IcInU(x,8,a,t);
@@ -108,13 +108,13 @@ IcIn (CARD32 x, CARD8 y)
IcGetPixels((image)->pixels,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
switch (__bpp__) { \
case 32: \
- (bits) = *(CARD32 *) __bits__; \
+ (bits) = *(uint32_t *) __bits__; \
break; \
case 24: \
- (bits) = Fetch24 ((CARD8 *) __bits__); \
+ (bits) = Fetch24 ((uint8_t *) __bits__); \
break; \
case 16: \
- (bits) = *(CARD16 *) __bits__; \
+ (bits) = *(uint16_t *) __bits__; \
(bits) = cvt0565to8888(bits); \
break; \
default: \
@@ -143,24 +143,24 @@ IcIn (CARD32 x, CARD8 y)
*/
void
-IcCompositeSolidMask_nx8x8888 (CARD8 op,
+IcCompositeSolidMask_nx8x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 src, srca;
- CARD32 *dstLine, *dst, d, dstMask;
- CARD8 *maskLine, *mask, m;
+ uint32_t src, srca;
+ uint32_t *dstLine, *dst, d, dstMask;
+ uint8_t *maskLine, *mask, m;
IcStride dstStride, maskStride;
- CARD16 w;
+ uint16_t w;
IcComposeGetSolid(iSrc, src);
@@ -169,8 +169,8 @@ IcCompositeSolidMask_nx8x8888 (CARD8 op,
if (src == 0)
return;
- IcComposeGetStart (iDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
- IcComposeGetStart (iMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ IcComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
while (height--)
{
@@ -201,25 +201,25 @@ IcCompositeSolidMask_nx8x8888 (CARD8 op,
}
void
-IcCompositeSolidMask_nx8888x8888C (CARD8 op,
+IcCompositeSolidMask_nx8888x8888C (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 src, srca;
- CARD32 *dstLine, *dst, d, dstMask;
- CARD32 *maskLine, *mask, ma;
+ uint32_t src, srca;
+ uint32_t *dstLine, *dst, d, dstMask;
+ uint32_t *maskLine, *mask, ma;
IcStride dstStride, maskStride;
- CARD16 w;
- CARD32 m, n, o, p;
+ uint16_t w;
+ uint32_t m, n, o, p;
IcComposeGetSolid(iSrc, src);
@@ -228,8 +228,8 @@ IcCompositeSolidMask_nx8888x8888C (CARD8 op,
if (src == 0)
return;
- IcComposeGetStart (iDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
- IcComposeGetStart (iMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ IcComposeGetStart (iMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
while (height--)
{
@@ -253,13 +253,13 @@ IcCompositeSolidMask_nx8888x8888C (CARD8 op,
{
d = *dst;
#define IcInOverC(src,srca,msk,dst,i,result) { \
- CARD16 __a = IcGet8(msk,i); \
- CARD32 __t, __ta; \
- CARD32 __i; \
+ uint16_t __a = IcGet8(msk,i); \
+ uint32_t __t, __ta; \
+ uint32_t __i; \
__t = IcIntMult (IcGet8(src,i), __a,__i); \
- __ta = (CARD8) ~IcIntMult (srca, __a,__i); \
+ __ta = (uint8_t) ~IcIntMult (srca, __a,__i); \
__t = __t + IcIntMult(IcGet8(dst,i),__ta,__i); \
- __t = (CARD32) (CARD8) (__t | (-(__t >> 8))); \
+ __t = (uint32_t) (uint8_t) (__t | (-(__t >> 8))); \
result = __t << (i); \
}
IcInOverC (src, srca, ma, d, 0, m);
@@ -274,25 +274,25 @@ IcCompositeSolidMask_nx8888x8888C (CARD8 op,
}
void
-IcCompositeSolidMask_nx8x0888 (CARD8 op,
+IcCompositeSolidMask_nx8x0888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 src, srca;
- CARD8 *dstLine, *dst;
- CARD32 d;
- CARD8 *maskLine, *mask, m;
+ uint32_t src, srca;
+ uint8_t *dstLine, *dst;
+ uint32_t d;
+ uint8_t *maskLine, *mask, m;
IcStride dstStride, maskStride;
- CARD16 w;
+ uint16_t w;
IcComposeGetSolid(iSrc, src);
@@ -300,8 +300,8 @@ IcCompositeSolidMask_nx8x0888 (CARD8 op,
if (src == 0)
return;
- IcComposeGetStart (iDst, xDst, yDst, CARD8, dstStride, dstLine, 3);
- IcComposeGetStart (iMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
+ IcComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
while (height--)
{
@@ -336,25 +336,25 @@ IcCompositeSolidMask_nx8x0888 (CARD8 op,
}
void
-IcCompositeSolidMask_nx8x0565 (CARD8 op,
+IcCompositeSolidMask_nx8x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 src, srca;
- CARD16 *dstLine, *dst;
- CARD32 d;
- CARD8 *maskLine, *mask, m;
+ uint32_t src, srca;
+ uint16_t *dstLine, *dst;
+ uint32_t d;
+ uint8_t *maskLine, *mask, m;
IcStride dstStride, maskStride;
- CARD16 w;
+ uint16_t w;
IcComposeGetSolid(iSrc, src);
@@ -362,8 +362,8 @@ IcCompositeSolidMask_nx8x0565 (CARD8 op,
if (src == 0)
return;
- IcComposeGetStart (iDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
- IcComposeGetStart (iMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+ IcComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
while (height--)
{
@@ -399,27 +399,27 @@ IcCompositeSolidMask_nx8x0565 (CARD8 op,
}
void
-IcCompositeSolidMask_nx8888x0565C (CARD8 op,
+IcCompositeSolidMask_nx8888x0565C (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 src, srca;
- CARD16 src16;
- CARD16 *dstLine, *dst;
- CARD32 d;
- CARD32 *maskLine, *mask, ma;
+ uint32_t src, srca;
+ uint16_t src16;
+ uint16_t *dstLine, *dst;
+ uint32_t d;
+ uint32_t *maskLine, *mask, ma;
IcStride dstStride, maskStride;
- CARD16 w;
- CARD32 m, n, o;
+ uint16_t w;
+ uint32_t m, n, o;
IcComposeGetSolid(iSrc, src);
@@ -429,8 +429,8 @@ IcCompositeSolidMask_nx8888x0565C (CARD8 op,
src16 = cvt8888to0565(src);
- IcComposeGetStart (iDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
- IcComposeGetStart (iMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
+ IcComposeGetStart (iMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
while (height--)
{
@@ -472,27 +472,27 @@ IcCompositeSolidMask_nx8888x0565C (CARD8 op,
}
void
-IcCompositeSrc_8888x8888 (CARD8 op,
+IcCompositeSrc_8888x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 *dstLine, *dst, dstMask;
- CARD32 *srcLine, *src, s;
+ uint32_t *dstLine, *dst, dstMask;
+ uint32_t *srcLine, *src, s;
IcStride dstStride, srcStride;
- CARD8 a;
- CARD16 w;
+ uint8_t a;
+ uint16_t w;
- IcComposeGetStart (iDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
- IcComposeGetStart (iSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
+ IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
dstMask = IcFullMask (iDst->pixels->depth);
@@ -518,28 +518,28 @@ IcCompositeSrc_8888x8888 (CARD8 op,
}
void
-IcCompositeSrc_8888x0888 (CARD8 op,
+IcCompositeSrc_8888x0888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD8 *dstLine, *dst;
- CARD32 d;
- CARD32 *srcLine, *src, s;
- CARD8 a;
+ uint8_t *dstLine, *dst;
+ uint32_t d;
+ uint32_t *srcLine, *src, s;
+ uint8_t a;
IcStride dstStride, srcStride;
- CARD16 w;
+ uint16_t w;
- IcComposeGetStart (iDst, xDst, yDst, CARD8, dstStride, dstLine, 3);
- IcComposeGetStart (iSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
+ IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
while (height--)
{
@@ -567,28 +567,28 @@ IcCompositeSrc_8888x0888 (CARD8 op,
}
void
-IcCompositeSrc_8888x0565 (CARD8 op,
+IcCompositeSrc_8888x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD16 *dstLine, *dst;
- CARD32 d;
- CARD32 *srcLine, *src, s;
- CARD8 a;
+ uint16_t *dstLine, *dst;
+ uint32_t d;
+ uint32_t *srcLine, *src, s;
+ uint8_t a;
IcStride dstStride, srcStride;
- CARD16 w;
+ uint16_t w;
- IcComposeGetStart (iSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
- IcComposeGetStart (iDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
+ IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
while (height--)
{
@@ -619,27 +619,27 @@ IcCompositeSrc_8888x0565 (CARD8 op,
}
void
-IcCompositeSrc_0565x0565 (CARD8 op,
+IcCompositeSrc_0565x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD16 *dstLine, *dst;
- CARD16 *srcLine, *src;
+ uint16_t *dstLine, *dst;
+ uint16_t *srcLine, *src;
IcStride dstStride, srcStride;
- CARD16 w;
+ uint16_t w;
- IcComposeGetStart (iSrc, xSrc, ySrc, CARD16, srcStride, srcLine, 1);
+ IcComposeGetStart (iSrc, xSrc, ySrc, uint16_t, srcStride, srcLine, 1);
- IcComposeGetStart (iDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
while (height--)
{
@@ -655,28 +655,28 @@ IcCompositeSrc_0565x0565 (CARD8 op,
}
void
-IcCompositeSrcAdd_8000x8000 (CARD8 op,
+IcCompositeSrcAdd_8000x8000 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD8 *dstLine, *dst;
- CARD8 *srcLine, *src;
+ uint8_t *dstLine, *dst;
+ uint8_t *srcLine, *src;
IcStride dstStride, srcStride;
- CARD8 w;
- CARD8 s, d;
- CARD16 t;
+ uint8_t w;
+ uint8_t s, d;
+ uint16_t t;
- IcComposeGetStart (iSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 1);
- IcComposeGetStart (iDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
+ IcComposeGetStart (iSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
while (height--)
{
@@ -701,29 +701,29 @@ IcCompositeSrcAdd_8000x8000 (CARD8 op,
}
void
-IcCompositeSrcAdd_8888x8888 (CARD8 op,
+IcCompositeSrcAdd_8888x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
- CARD32 *dstLine, *dst;
- CARD32 *srcLine, *src;
+ uint32_t *dstLine, *dst;
+ uint32_t *srcLine, *src;
IcStride dstStride, srcStride;
- CARD16 w;
- CARD32 s, d;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint16_t w;
+ uint32_t s, d;
+ uint16_t t;
+ uint32_t m,n,o,p;
- IcComposeGetStart (iSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
- IcComposeGetStart (iDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
+ IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
+ IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
while (height--)
{
@@ -754,18 +754,18 @@ IcCompositeSrcAdd_8888x8888 (CARD8 op,
}
void
-IcCompositeSrcAdd_1000x1000 (CARD8 op,
+IcCompositeSrcAdd_1000x1000 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
IcBits *dstBits, *srcBits;
IcStride dstStride, srcStride;
@@ -797,18 +797,18 @@ IcCompositeSrcAdd_1000x1000 (CARD8 op,
}
void
-IcCompositeSolidMask_nx1xn (CARD8 op,
+IcCompositeSolidMask_nx1xn (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
IcBits *dstBits;
IcStip *maskBits;
diff --git a/pixman/src/ic.h b/pixman/src/ic.h
index c5283256..1a870531 100644
--- a/pixman/src/ic.h
+++ b/pixman/src/ic.h
@@ -22,24 +22,24 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef _IC_H_
-#define _IC_H_
+#ifndef IC_H_INCLUDED
+#define IC_H_INCLUDED
-#include <stdint.h>
+#if defined (__SVR4) && defined (__sun)
+# include <sys/int_types.h>
+#else
+# include <stdint.h>
+#endif
-#include "pixregion.h"
+#include <pixregion.h>
/* NOTE: Must be manually synchronized with LIBIC_VERSION in configure.in */
#define IC_MAJOR 0
#define IC_MINOR 1
#define IC_REVISION 0
-#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
-#define _ICFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
-#define _ICFUNCPROTOEND }
-#else
-#define _ICFUNCPROTOBEGIN
-#define _ICFUNCPROTOEND
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
#endif
/* icformat.c */
@@ -58,8 +58,6 @@ typedef struct _IcFormat {
int alpha, alphaMask;
} IcFormat;
-_ICFUNCPROTOBEGIN
-
void
IcFormatInit (IcFormat *format, IcFormatName name);
@@ -265,6 +263,8 @@ IcComposite (char op,
int width,
int height);
-_ICFUNCPROTOEND
+#if defined(__cplusplus) || defined(c_plusplus)
+};
+#endif
-#endif /* _IC_H_ */
+#endif /* IC_H_INCLUDED */
diff --git a/pixman/src/iccompose.c b/pixman/src/iccompose.c
index 9b392754..8951c7a6 100644
--- a/pixman/src/iccompose.c
+++ b/pixman/src/iccompose.c
@@ -38,14 +38,14 @@
* Combine src and mask using IN
*/
-CARD32
+uint32_t
IcCombineMaskU (IcCompositeOperand *src,
IcCompositeOperand *msk)
{
- CARD32 x;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t x;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
if (!msk)
return (*src->fetch) (src);
@@ -70,11 +70,11 @@ IcCombineMaskC (IcCompositeOperand *src,
IcCompositeOperand *msk)
{
IcCompSrc s;
- CARD32 x;
- CARD32 a;
- CARD16 xa;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t x;
+ uint32_t a;
+ uint16_t xa;
+ uint16_t t;
+ uint32_t m,n,o,p;
if (!msk)
{
@@ -120,14 +120,14 @@ IcCombineMaskC (IcCompositeOperand *src,
return s;
}
-CARD32
+uint32_t
IcCombineMaskValueC (IcCompositeOperand *src,
IcCompositeOperand *msk)
{
- CARD32 x;
- CARD32 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t x;
+ uint32_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
if (!msk)
{
@@ -152,13 +152,13 @@ IcCombineMaskValueC (IcCompositeOperand *src,
/*
* Combine src and mask using IN, generating only the alpha component
*/
-CARD32
+uint32_t
IcCombineMaskAlphaU (IcCompositeOperand *src,
IcCompositeOperand *msk)
{
- CARD32 x;
- CARD16 a;
- CARD16 t;
+ uint32_t x;
+ uint16_t a;
+ uint16_t t;
if (!msk)
return (*src->fetch) (src);
@@ -174,14 +174,14 @@ IcCombineMaskAlphaU (IcCompositeOperand *src,
return IcInU(x,24,a,t);
}
-CARD32
+uint32_t
IcCombineMaskAlphaC (IcCompositeOperand *src,
IcCompositeOperand *msk)
{
- CARD32 x;
- CARD32 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t x;
+ uint32_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
if (!msk)
return (*src->fetch) (src);
@@ -241,10 +241,10 @@ IcCombineOverU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
a = ~s >> 24;
@@ -269,10 +269,10 @@ IcCombineOverC (IcCompositeOperand *src,
IcCompositeOperand *dst)
{
IcCompSrc cs;
- CARD32 s, d;
- CARD32 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint32_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
cs = IcCombineMaskC (src, msk);
s = cs.value;
@@ -297,10 +297,10 @@ IcCombineOverReverseU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
a = ~d >> 24;
@@ -324,10 +324,10 @@ IcCombineOverReverseC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD32 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint32_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
a = ~d >> 24;
@@ -351,10 +351,10 @@ IcCombineInU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
a = d >> 24;
@@ -379,10 +379,10 @@ IcCombineInC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
a = d >> 24;
@@ -407,10 +407,10 @@ IcCombineInReverseU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskAlphaU (src, msk);
a = s >> 24;
@@ -435,10 +435,10 @@ IcCombineInReverseC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD32 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint32_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskAlphaC (src, msk);
a = s;
@@ -463,10 +463,10 @@ IcCombineOutU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
a = ~d >> 24;
@@ -491,10 +491,10 @@ IcCombineOutC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
a = ~d >> 24;
@@ -519,10 +519,10 @@ IcCombineOutReverseU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskAlphaU (src, msk);
a = ~s >> 24;
@@ -547,10 +547,10 @@ IcCombineOutReverseC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD32 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint32_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskAlphaC (src, msk);
a = ~s;
@@ -575,10 +575,10 @@ IcCombineAtopU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 ad, as;
- CARD16 t,u,v;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t ad, as;
+ uint16_t t,u,v;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
d = (*dst->fetch) (dst);
@@ -597,11 +597,11 @@ IcCombineAtopC (IcCompositeOperand *src,
IcCompositeOperand *dst)
{
IcCompSrc cs;
- CARD32 s, d;
- CARD32 ad;
- CARD16 as;
- CARD16 t, u, v;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint32_t ad;
+ uint16_t as;
+ uint16_t t, u, v;
+ uint32_t m,n,o,p;
cs = IcCombineMaskC (src, msk);
d = (*dst->fetch) (dst);
@@ -620,10 +620,10 @@ IcCombineAtopReverseU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 ad, as;
- CARD16 t, u, v;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t ad, as;
+ uint16_t t, u, v;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
d = (*dst->fetch) (dst);
@@ -642,10 +642,10 @@ IcCombineAtopReverseC (IcCompositeOperand *src,
IcCompositeOperand *dst)
{
IcCompSrc cs;
- CARD32 s, d, ad;
- CARD16 as;
- CARD16 t, u, v;
- CARD32 m,n,o,p;
+ uint32_t s, d, ad;
+ uint16_t as;
+ uint16_t t, u, v;
+ uint32_t m,n,o,p;
cs = IcCombineMaskC (src, msk);
d = (*dst->fetch) (dst);
@@ -664,10 +664,10 @@ IcCombineXorU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 ad, as;
- CARD16 t, u, v;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t ad, as;
+ uint16_t t, u, v;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
d = (*dst->fetch) (dst);
@@ -686,10 +686,10 @@ IcCombineXorC (IcCompositeOperand *src,
IcCompositeOperand *dst)
{
IcCompSrc cs;
- CARD32 s, d, ad;
- CARD16 as;
- CARD16 t, u, v;
- CARD32 m,n,o,p;
+ uint32_t s, d, ad;
+ uint16_t as;
+ uint16_t t, u, v;
+ uint32_t m,n,o,p;
cs = IcCombineMaskC (src, msk);
d = (*dst->fetch) (dst);
@@ -708,9 +708,9 @@ IcCombineAddU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
if (s == ~0)
@@ -734,9 +734,9 @@ IcCombineAddC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskValueC (src, msk);
if (s == ~0)
@@ -760,12 +760,12 @@ IcCombineSaturateU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s = IcCombineMaskU (src, msk), d;
+ uint32_t s = IcCombineMaskU (src, msk), d;
#if 0
- CARD16 sa, da;
- CARD16 ad, as;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint16_t sa, da;
+ uint16_t ad, as;
+ uint16_t t;
+ uint32_t m,n,o,p;
d = (*dst->fetch) (dst);
sa = s >> 24;
@@ -805,10 +805,10 @@ IcCombineSaturateC (IcCompositeOperand *src,
IcCompositeOperand *dst)
{
IcCompSrc cs;
- CARD32 s, d;
- CARD16 sa, sr, sg, sb, da;
- CARD16 t, u, v;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t sa, sr, sg, sb, da;
+ uint16_t t, u, v;
+ uint32_t m,n,o,p;
cs = IcCombineMaskC (src, msk);
d = (*dst->fetch) (dst);
@@ -882,8 +882,8 @@ IcCombineSaturateC (IcCompositeOperand *src,
#define CombineXor (CombineAOut|CombineBOut)
/* portion covered by a but not b */
-CARD8
-IcCombineDisjointOutPart (CARD8 a, CARD8 b)
+uint8_t
+IcCombineDisjointOutPart (uint8_t a, uint8_t b)
{
/* min (1, (1-b) / a) */
@@ -894,8 +894,8 @@ IcCombineDisjointOutPart (CARD8 a, CARD8 b)
}
/* portion covered by both a and b */
-CARD8
-IcCombineDisjointInPart (CARD8 a, CARD8 b)
+uint8_t
+IcCombineDisjointInPart (uint8_t a, uint8_t b)
{
/* max (1-(1-b)/a,0) */
/* = - min ((1-b)/a - 1, 0) */
@@ -911,12 +911,12 @@ void
IcCombineDisjointGeneralU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine)
+ uint8_t combine)
{
- CARD32 s, d;
- CARD32 m,n,o,p;
- CARD16 Fa, Fb, t, u, v;
- CARD8 sa, da;
+ uint32_t s, d;
+ uint32_t m,n,o,p;
+ uint16_t Fa, Fb, t, u, v;
+ uint8_t sa, da;
s = IcCombineMaskU (src, msk);
sa = s >> 24;
@@ -965,15 +965,15 @@ void
IcCombineDisjointGeneralC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine)
+ uint8_t combine)
{
IcCompSrc cs;
- CARD32 s, d;
- CARD32 m,n,o,p;
- CARD32 Fa;
- CARD16 Fb, t, u, v;
- CARD32 sa;
- CARD8 da;
+ uint32_t s, d;
+ uint32_t m,n,o,p;
+ uint32_t Fa;
+ uint16_t Fb, t, u, v;
+ uint32_t sa;
+ uint8_t da;
cs = IcCombineMaskC (src, msk);
s = cs.value;
@@ -987,17 +987,17 @@ IcCombineDisjointGeneralC (IcCompositeOperand *src,
Fa = 0;
break;
case CombineAOut:
- m = IcCombineDisjointOutPart ((CARD8) (sa >> 0), da);
- n = IcCombineDisjointOutPart ((CARD8) (sa >> 8), da) << 8;
- o = IcCombineDisjointOutPart ((CARD8) (sa >> 16), da) << 16;
- p = IcCombineDisjointOutPart ((CARD8) (sa >> 24), da) << 24;
+ m = IcCombineDisjointOutPart ((uint8_t) (sa >> 0), da);
+ n = IcCombineDisjointOutPart ((uint8_t) (sa >> 8), da) << 8;
+ o = IcCombineDisjointOutPart ((uint8_t) (sa >> 16), da) << 16;
+ p = IcCombineDisjointOutPart ((uint8_t) (sa >> 24), da) << 24;
Fa = m|n|o|p;
break;
case CombineAIn:
- m = IcCombineDisjointOutPart ((CARD8) (sa >> 0), da);
- n = IcCombineDisjointOutPart ((CARD8) (sa >> 8), da) << 8;
- o = IcCombineDisjointOutPart ((CARD8) (sa >> 16), da) << 16;
- p = IcCombineDisjointOutPart ((CARD8) (sa >> 24), da) << 24;
+ m = IcCombineDisjointOutPart ((uint8_t) (sa >> 0), da);
+ n = IcCombineDisjointOutPart ((uint8_t) (sa >> 8), da) << 8;
+ o = IcCombineDisjointOutPart ((uint8_t) (sa >> 16), da) << 16;
+ p = IcCombineDisjointOutPart ((uint8_t) (sa >> 24), da) << 24;
Fa = m|n|o|p;
break;
case CombineA:
@@ -1032,10 +1032,10 @@ IcCombineDisjointOverU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst)
{
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
a = s >> 24;
@@ -1192,8 +1192,8 @@ IcCombineDisjointXorC (IcCompositeOperand *src,
}
/* portion covered by a but not b */
-CARD8
-IcCombineConjointOutPart (CARD8 a, CARD8 b)
+uint8_t
+IcCombineConjointOutPart (uint8_t a, uint8_t b)
{
/* max (1-b/a,0) */
/* = 1-min(b/a,1) */
@@ -1206,8 +1206,8 @@ IcCombineConjointOutPart (CARD8 a, CARD8 b)
}
/* portion covered by both a and b */
-CARD8
-IcCombineConjointInPart (CARD8 a, CARD8 b)
+uint8_t
+IcCombineConjointInPart (uint8_t a, uint8_t b)
{
/* min (1,b/a) */
@@ -1220,12 +1220,12 @@ void
IcCombineConjointGeneralU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine)
+ uint8_t combine)
{
- CARD32 s, d;
- CARD32 m,n,o,p;
- CARD16 Fa, Fb, t, u, v;
- CARD8 sa, da;
+ uint32_t s, d;
+ uint32_t m,n,o,p;
+ uint16_t Fa, Fb, t, u, v;
+ uint8_t sa, da;
s = IcCombineMaskU (src, msk);
sa = s >> 24;
@@ -1274,15 +1274,15 @@ void
IcCombineConjointGeneralC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine)
+ uint8_t combine)
{
IcCompSrc cs;
- CARD32 s, d;
- CARD32 m,n,o,p;
- CARD32 Fa;
- CARD16 Fb, t, u, v;
- CARD32 sa;
- CARD8 da;
+ uint32_t s, d;
+ uint32_t m,n,o,p;
+ uint32_t Fa;
+ uint16_t Fb, t, u, v;
+ uint32_t sa;
+ uint8_t da;
cs = IcCombineMaskC (src, msk);
s = cs.value;
@@ -1296,17 +1296,17 @@ IcCombineConjointGeneralC (IcCompositeOperand *src,
Fa = 0;
break;
case CombineAOut:
- m = IcCombineConjointOutPart ((CARD8) (sa >> 0), da);
- n = IcCombineConjointOutPart ((CARD8) (sa >> 8), da) << 8;
- o = IcCombineConjointOutPart ((CARD8) (sa >> 16), da) << 16;
- p = IcCombineConjointOutPart ((CARD8) (sa >> 24), da) << 24;
+ m = IcCombineConjointOutPart ((uint8_t) (sa >> 0), da);
+ n = IcCombineConjointOutPart ((uint8_t) (sa >> 8), da) << 8;
+ o = IcCombineConjointOutPart ((uint8_t) (sa >> 16), da) << 16;
+ p = IcCombineConjointOutPart ((uint8_t) (sa >> 24), da) << 24;
Fa = m|n|o|p;
break;
case CombineAIn:
- m = IcCombineConjointOutPart ((CARD8) (sa >> 0), da);
- n = IcCombineConjointOutPart ((CARD8) (sa >> 8), da) << 8;
- o = IcCombineConjointOutPart ((CARD8) (sa >> 16), da) << 16;
- p = IcCombineConjointOutPart ((CARD8) (sa >> 24), da) << 24;
+ m = IcCombineConjointOutPart ((uint8_t) (sa >> 0), da);
+ n = IcCombineConjointOutPart ((uint8_t) (sa >> 8), da) << 8;
+ o = IcCombineConjointOutPart ((uint8_t) (sa >> 16), da) << 16;
+ p = IcCombineConjointOutPart ((uint8_t) (sa >> 24), da) << 24;
Fa = m|n|o|p;
break;
case CombineA:
@@ -1343,10 +1343,10 @@ IcCombineConjointOverU (IcCompositeOperand *src,
{
IcCombineConjointGeneralU (src, msk, dst, CombineAOver);
/*
- CARD32 s, d;
- CARD16 a;
- CARD16 t;
- CARD32 m,n,o,p;
+ uint32_t s, d;
+ uint16_t a;
+ uint16_t t;
+ uint32_t m,n,o,p;
s = IcCombineMaskU (src, msk);
a = s >> 24;
@@ -1601,25 +1601,25 @@ IcCombineFunc IcCombineFuncC[] = {
* All of the fetch functions
*/
-CARD32
+uint32_t
IcFetch_a8r8g8b8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- return ((CARD32 *)line)[offset >> 5];
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ return ((uint32_t *)line)[offset >> 5];
}
-CARD32
+uint32_t
IcFetch_x8r8g8b8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- return ((CARD32 *)line)[offset >> 5] | 0xff000000;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ return ((uint32_t *)line)[offset >> 5] | 0xff000000;
}
-CARD32
+uint32_t
IcFetch_a8b8g8r8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD32 *)line)[offset >> 5];
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint32_t *)line)[offset >> 5];
return ((pixel & 0xff000000) |
((pixel >> 16) & 0xff) |
@@ -1627,11 +1627,11 @@ IcFetch_a8b8g8r8 (IcCompositeOperand *op)
((pixel & 0xff) << 16));
}
-CARD32
+uint32_t
IcFetch_x8b8g8r8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD32 *)line)[offset >> 5];
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint32_t *)line)[offset >> 5];
return ((0xff000000) |
((pixel >> 16) & 0xff) |
@@ -1639,11 +1639,11 @@ IcFetch_x8b8g8r8 (IcCompositeOperand *op)
((pixel & 0xff) << 16));
}
-CARD32
+uint32_t
IcFetch_r8g8b8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
#if IMAGE_BYTE_ORDER == MSBFirst
return (0xff000000 |
(pixel[0] << 16) |
@@ -1657,11 +1657,11 @@ IcFetch_r8g8b8 (IcCompositeOperand *op)
#endif
}
-CARD32
+uint32_t
IcFetch_b8g8r8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
#if IMAGE_BYTE_ORDER == MSBFirst
return (0xff000000 |
(pixel[2] << 16) |
@@ -1675,12 +1675,12 @@ IcFetch_b8g8r8 (IcCompositeOperand *op)
#endif
}
-CARD32
+uint32_t
IcFetch_r5g6b5 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t r,g,b;
r = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) << 8;
g = ((pixel & 0x07e0) | ((pixel & 0x0600) >> 6)) << 5;
@@ -1688,12 +1688,12 @@ IcFetch_r5g6b5 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_b5g6r5 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t r,g,b;
b = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) >> 8;
g = ((pixel & 0x07e0) | ((pixel & 0x0600) >> 6)) << 5;
@@ -1701,26 +1701,26 @@ IcFetch_b5g6r5 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_a1r5g5b5 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t a,r,g,b;
- a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24;
+ a = (uint32_t) ((uint8_t) (0 - ((pixel & 0x8000) >> 15))) << 24;
r = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) << 9;
g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
b = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) >> 2;
return (a | r | g | b);
}
-CARD32
+uint32_t
IcFetch_x1r5g5b5 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t r,g,b;
r = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) << 9;
g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
@@ -1728,26 +1728,26 @@ IcFetch_x1r5g5b5 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_a1b5g5r5 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t a,r,g,b;
- a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24;
+ a = (uint32_t) ((uint8_t) (0 - ((pixel & 0x8000) >> 15))) << 24;
b = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) >> 7;
g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
r = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) << 14;
return (a | r | g | b);
}
-CARD32
+uint32_t
IcFetch_x1b5g5r5 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t r,g,b;
b = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) >> 7;
g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
@@ -1755,12 +1755,12 @@ IcFetch_x1b5g5r5 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_a4r4g4b4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t a,r,g,b;
a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
@@ -1769,12 +1769,12 @@ IcFetch_a4r4g4b4 (IcCompositeOperand *op)
return (a | r | g | b);
}
-CARD32
+uint32_t
IcFetch_x4r4g4b4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t r,g,b;
r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
@@ -1782,12 +1782,12 @@ IcFetch_x4r4g4b4 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_a4b4g4r4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t a,r,g,b;
a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
@@ -1796,12 +1796,12 @@ IcFetch_a4b4g4r4 (IcCompositeOperand *op)
return (a | r | g | b);
}
-CARD32
+uint32_t
IcFetch_x4b4g4r4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD16 *) line)[offset >> 4];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint16_t *) line)[offset >> 4];
+ uint32_t r,g,b;
b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
@@ -1809,32 +1809,32 @@ IcFetch_x4b4g4r4 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_a8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
return pixel << 24;
}
-CARD32
+uint32_t
IcFetcha_a8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
pixel |= pixel << 8;
pixel |= pixel << 16;
return pixel;
}
-CARD32
+uint32_t
IcFetch_r3g3b2 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
+ uint32_t r,g,b;
r = ((pixel & 0xe0) | ((pixel & 0xe0) >> 3) | ((pixel & 0xc0) >> 6)) << 16;
g = ((pixel & 0x1c) | ((pixel & 0x18) >> 3) | ((pixel & 0x1c) << 3)) << 8;
@@ -1845,12 +1845,12 @@ IcFetch_r3g3b2 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_b2g3r3 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
+ uint32_t r,g,b;
b = (((pixel & 0xc0) ) |
((pixel & 0xc0) >> 2) |
@@ -1863,12 +1863,12 @@ IcFetch_b2g3r3 (IcCompositeOperand *op)
return (0xff000000 | r | g | b);
}
-CARD32
+uint32_t
IcFetch_a2r2g2b2 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
+ uint32_t a,r,g,b;
a = ((pixel & 0xc0) * 0x55) << 18;
r = ((pixel & 0x30) * 0x55) << 12;
@@ -1877,12 +1877,12 @@ IcFetch_a2r2g2b2 (IcCompositeOperand *op)
return a|r|g|b;
}
-CARD32
+uint32_t
IcFetch_a2b2g2r2 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
+ uint32_t a,r,g,b;
a = ((pixel & 0xc0) * 0x55) << 18;
b = ((pixel & 0x30) * 0x55) >> 6;
@@ -1892,38 +1892,38 @@ IcFetch_a2b2g2r2 (IcCompositeOperand *op)
}
/* XXX: We're not supporting indexed formats, right?
-CARD32
+uint32_t
IcFetch_c8 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD8 *) line)[offset>>3];
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint8_t *) line)[offset>>3];
return op->indexed->rgba[pixel];
}
*/
-#define Fetch8(l,o) (((CARD8 *) (l))[(o) >> 3])
+#define Fetch8(l,o) (((uint8_t *) (l))[(o) >> 3])
#if IMAGE_BYTE_ORDER == MSBFirst
#define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
#else
#define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) >> 4 : Fetch8(l,o) & 0xf)
#endif
-CARD32
+uint32_t
IcFetch_a4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
pixel |= pixel << 4;
return pixel << 24;
}
-CARD32
+uint32_t
IcFetcha_a4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
pixel |= pixel << 4;
pixel |= pixel << 8;
@@ -1931,12 +1931,12 @@ IcFetcha_a4 (IcCompositeOperand *op)
return pixel;
}
-CARD32
+uint32_t
IcFetch_r1g2b1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
+ uint32_t r,g,b;
r = ((pixel & 0x8) * 0xff) << 13;
g = ((pixel & 0x6) * 0x55) << 7;
@@ -1944,12 +1944,12 @@ IcFetch_r1g2b1 (IcCompositeOperand *op)
return 0xff000000|r|g|b;
}
-CARD32
+uint32_t
IcFetch_b1g2r1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
- CARD32 r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
+ uint32_t r,g,b;
b = ((pixel & 0x8) * 0xff) >> 3;
g = ((pixel & 0x6) * 0x55) << 7;
@@ -1957,12 +1957,12 @@ IcFetch_b1g2r1 (IcCompositeOperand *op)
return 0xff000000|r|g|b;
}
-CARD32
+uint32_t
IcFetch_a1r1g1b1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
+ uint32_t a,r,g,b;
a = ((pixel & 0x8) * 0xff) << 21;
r = ((pixel & 0x4) * 0xff) << 14;
@@ -1971,12 +1971,12 @@ IcFetch_a1r1g1b1 (IcCompositeOperand *op)
return a|r|g|b;
}
-CARD32
+uint32_t
IcFetch_a1b1g1r1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
- CARD32 a,r,g,b;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
+ uint32_t a,r,g,b;
a = ((pixel & 0x8) * 0xff) << 21;
r = ((pixel & 0x4) * 0xff) >> 3;
@@ -1986,22 +1986,22 @@ IcFetch_a1b1g1r1 (IcCompositeOperand *op)
}
/* XXX: We're not supporting indexed formats, right?
-CARD32
+uint32_t
IcFetch_c4 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = Fetch4(line, offset);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = Fetch4(line, offset);
return op->indexed->rgba[pixel];
}
*/
-CARD32
+uint32_t
IcFetcha_a1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD32 *)line)[offset >> 5];
- CARD32 a;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint32_t *)line)[offset >> 5];
+ uint32_t a;
#if BITMAP_BIT_ORDER == MSBFirst
a = pixel >> (0x1f - (offset & 0x1f));
#else
@@ -2016,12 +2016,12 @@ IcFetcha_a1 (IcCompositeOperand *op)
return a;
}
-CARD32
+uint32_t
IcFetch_a1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD32 *)line)[offset >> 5];
- CARD32 a;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint32_t *)line)[offset >> 5];
+ uint32_t a;
#if BITMAP_BIT_ORDER == MSBFirst
a = pixel >> (0x1f - (offset & 0x1f));
#else
@@ -2035,12 +2035,12 @@ IcFetch_a1 (IcCompositeOperand *op)
}
/* XXX: We're not supporting indexed formats, right?
-CARD32
+uint32_t
IcFetch_g1 (IcCompositeOperand *op)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel = ((CARD32 *)line)[offset >> 5];
- CARD32 a;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel = ((uint32_t *)line)[offset >> 5];
+ uint32_t a;
#if BITMAP_BIT_ORDER == MSBFirst
a = pixel >> (0x1f - (offset & 0x1f));
#else
@@ -2055,44 +2055,44 @@ IcFetch_g1 (IcCompositeOperand *op)
* All the store functions
*/
-#define Splita(v) CARD32 a = ((v) >> 24), r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff
-#define Split(v) CARD32 r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff
+#define Splita(v) uint32_t a = ((v) >> 24), r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff
+#define Split(v) uint32_t r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff
void
-IcStore_a8r8g8b8 (IcCompositeOperand *op, CARD32 value)
+IcStore_a8r8g8b8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- ((CARD32 *)line)[offset >> 5] = value;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ ((uint32_t *)line)[offset >> 5] = value;
}
void
-IcStore_x8r8g8b8 (IcCompositeOperand *op, CARD32 value)
+IcStore_x8r8g8b8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- ((CARD32 *)line)[offset >> 5] = value & 0xffffff;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ ((uint32_t *)line)[offset >> 5] = value & 0xffffff;
}
void
-IcStore_a8b8g8r8 (IcCompositeOperand *op, CARD32 value)
+IcStore_a8b8g8r8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
Splita(value);
- ((CARD32 *)line)[offset >> 5] = a << 24 | b << 16 | g << 8 | r;
+ ((uint32_t *)line)[offset >> 5] = a << 24 | b << 16 | g << 8 | r;
}
void
-IcStore_x8b8g8r8 (IcCompositeOperand *op, CARD32 value)
+IcStore_x8b8g8r8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
Split(value);
- ((CARD32 *)line)[offset >> 5] = b << 16 | g << 8 | r;
+ ((uint32_t *)line)[offset >> 5] = b << 16 | g << 8 | r;
}
void
-IcStore_r8g8b8 (IcCompositeOperand *op, CARD32 value)
+IcStore_r8g8b8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
Split(value);
#if IMAGE_BYTE_ORDER == MSBFirst
pixel[0] = r;
@@ -2106,10 +2106,10 @@ IcStore_r8g8b8 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_b8g8r8 (IcCompositeOperand *op, CARD32 value)
+IcStore_b8g8r8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
Split(value);
#if IMAGE_BYTE_ORDER == MSBFirst
pixel[0] = b;
@@ -2123,10 +2123,10 @@ IcStore_b8g8r8 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_r5g6b5 (IcCompositeOperand *op, CARD32 value)
+IcStore_r5g6b5 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Split(value);
*pixel = (((r << 8) & 0xf800) |
((g << 3) & 0x07e0) |
@@ -2134,10 +2134,10 @@ IcStore_r5g6b5 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_b5g6r5 (IcCompositeOperand *op, CARD32 value)
+IcStore_b5g6r5 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Split(value);
*pixel = (((b << 8) & 0xf800) |
((g << 3) & 0x07e0) |
@@ -2145,10 +2145,10 @@ IcStore_b5g6r5 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a1r5g5b5 (IcCompositeOperand *op, CARD32 value)
+IcStore_a1r5g5b5 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Splita(value);
*pixel = (((a << 8) & 0x8000) |
((r << 7) & 0x7c00) |
@@ -2157,10 +2157,10 @@ IcStore_a1r5g5b5 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_x1r5g5b5 (IcCompositeOperand *op, CARD32 value)
+IcStore_x1r5g5b5 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Split(value);
*pixel = (((r << 7) & 0x7c00) |
((g << 2) & 0x03e0) |
@@ -2168,10 +2168,10 @@ IcStore_x1r5g5b5 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a1b5g5r5 (IcCompositeOperand *op, CARD32 value)
+IcStore_a1b5g5r5 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Splita(value);
*pixel = (((a << 8) & 0x8000) |
((b << 7) & 0x7c00) |
@@ -2180,10 +2180,10 @@ IcStore_a1b5g5r5 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_x1b5g5r5 (IcCompositeOperand *op, CARD32 value)
+IcStore_x1b5g5r5 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Split(value);
*pixel = (((b << 7) & 0x7c00) |
((g << 2) & 0x03e0) |
@@ -2191,10 +2191,10 @@ IcStore_x1b5g5r5 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a4r4g4b4 (IcCompositeOperand *op, CARD32 value)
+IcStore_a4r4g4b4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Splita(value);
*pixel = (((a << 8) & 0xf000) |
((r << 4) & 0x0f00) |
@@ -2203,10 +2203,10 @@ IcStore_a4r4g4b4 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_x4r4g4b4 (IcCompositeOperand *op, CARD32 value)
+IcStore_x4r4g4b4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Split(value);
*pixel = (((r << 4) & 0x0f00) |
((g ) & 0x00f0) |
@@ -2214,10 +2214,10 @@ IcStore_x4r4g4b4 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a4b4g4r4 (IcCompositeOperand *op, CARD32 value)
+IcStore_a4b4g4r4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Splita(value);
*pixel = (((a << 8) & 0xf000) |
((b << 4) & 0x0f00) |
@@ -2226,10 +2226,10 @@ IcStore_a4b4g4r4 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_x4b4g4r4 (IcCompositeOperand *op, CARD32 value)
+IcStore_x4b4g4r4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD16 *pixel = ((CARD16 *) line) + (offset >> 4);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint16_t *pixel = ((uint16_t *) line) + (offset >> 4);
Split(value);
*pixel = (((b << 4) & 0x0f00) |
((g ) & 0x00f0) |
@@ -2237,18 +2237,18 @@ IcStore_x4b4g4r4 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a8 (IcCompositeOperand *op, CARD32 value)
+IcStore_a8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
*pixel = value >> 24;
}
void
-IcStore_r3g3b2 (IcCompositeOperand *op, CARD32 value)
+IcStore_r3g3b2 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
Split(value);
*pixel = (((r ) & 0xe0) |
((g >> 3) & 0x1c) |
@@ -2256,10 +2256,10 @@ IcStore_r3g3b2 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_b2g3r3 (IcCompositeOperand *op, CARD32 value)
+IcStore_b2g3r3 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
Split(value);
*pixel = (((b ) & 0xe0) |
((g >> 3) & 0x1c) |
@@ -2267,10 +2267,10 @@ IcStore_b2g3r3 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a2r2g2b2 (IcCompositeOperand *op, CARD32 value)
+IcStore_a2r2g2b2 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
Splita(value);
*pixel = (((a ) & 0xc0) |
((r >> 2) & 0x30) |
@@ -2280,23 +2280,23 @@ IcStore_a2r2g2b2 (IcCompositeOperand *op, CARD32 value)
/* XXX: We're not supporting indexed formats, right?
void
-IcStore_c8 (IcCompositeOperand *op, CARD32 value)
+IcStore_c8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
*pixel = IcIndexToEnt24(op->indexed,value);
}
void
-IcStore_g8 (IcCompositeOperand *op, CARD32 value)
+IcStore_g8 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD8 *pixel = ((CARD8 *) line) + (offset >> 3);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint8_t *pixel = ((uint8_t *) line) + (offset >> 3);
*pixel = IcIndexToEntY24(op->indexed,value);
}
*/
-#define Store8(l,o,v) (((CARD8 *) l)[(o) >> 3] = (v))
+#define Store8(l,o,v) (((uint8_t *) l)[(o) >> 3] = (v))
#if IMAGE_BYTE_ORDER == MSBFirst
#define Store4(l,o,v) Store8(l,o,((o) & 4 ? \
(Fetch8(l,o) & 0xf0) | (v) : \
@@ -2308,17 +2308,17 @@ IcStore_g8 (IcCompositeOperand *op, CARD32 value)
#endif
void
-IcStore_a4 (IcCompositeOperand *op, CARD32 value)
+IcStore_a4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
Store4(line,offset,value>>28);
}
void
-IcStore_r1g2b1 (IcCompositeOperand *op, CARD32 value)
+IcStore_r1g2b1 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel;
Split(value);
pixel = (((r >> 4) & 0x8) |
@@ -2328,10 +2328,10 @@ IcStore_r1g2b1 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_b1g2r1 (IcCompositeOperand *op, CARD32 value)
+IcStore_b1g2r1 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel;
Split(value);
pixel = (((b >> 4) & 0x8) |
@@ -2341,10 +2341,10 @@ IcStore_b1g2r1 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a1r1g1b1 (IcCompositeOperand *op, CARD32 value)
+IcStore_a1r1g1b1 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel;
Splita(value);
pixel = (((a >> 4) & 0x8) |
((r >> 5) & 0x4) |
@@ -2354,10 +2354,10 @@ IcStore_a1r1g1b1 (IcCompositeOperand *op, CARD32 value)
}
void
-IcStore_a1b1g1r1 (IcCompositeOperand *op, CARD32 value)
+IcStore_a1b1g1r1 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel;
Splita(value);
pixel = (((a >> 4) & 0x8) |
((b >> 5) & 0x4) |
@@ -2368,20 +2368,20 @@ IcStore_a1b1g1r1 (IcCompositeOperand *op, CARD32 value)
/* XXX: We're not supporting indexed formats, right?
void
-IcStore_c4 (IcCompositeOperand *op, CARD32 value)
+IcStore_c4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel;
pixel = IcIndexToEnt24(op->indexed,value);
Store4(line,offset,pixel);
}
void
-IcStore_g4 (IcCompositeOperand *op, CARD32 value)
+IcStore_g4 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 pixel;
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t pixel;
pixel = IcIndexToEntY24(op->indexed,value);
Store4(line,offset,pixel);
@@ -2389,11 +2389,11 @@ IcStore_g4 (IcCompositeOperand *op, CARD32 value)
*/
void
-IcStore_a1 (IcCompositeOperand *op, CARD32 value)
+IcStore_a1 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 *pixel = ((CARD32 *) line) + (offset >> 5);
- CARD32 mask = IcStipMask(offset & 0x1f, 1);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t *pixel = ((uint32_t *) line) + (offset >> 5);
+ uint32_t mask = IcStipMask(offset & 0x1f, 1);
value = value & 0x80000000 ? mask : 0;
*pixel = (*pixel & ~mask) | value;
@@ -2401,50 +2401,50 @@ IcStore_a1 (IcCompositeOperand *op, CARD32 value)
/* XXX: We're not supporting indexed formats, right?
void
-IcStore_g1 (IcCompositeOperand *op, CARD32 value)
+IcStore_g1 (IcCompositeOperand *op, uint32_t value)
{
- IcBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset;
- CARD32 *pixel = ((CARD32 *) line) + (offset >> 5);
- CARD32 mask = IcStipMask(offset & 0x1f, 1);
+ IcBits *line = op->u.drawable.line; uint32_t offset = op->u.drawable.offset;
+ uint32_t *pixel = ((uint32_t *) line) + (offset >> 5);
+ uint32_t mask = IcStipMask(offset & 0x1f, 1);
value = IcIndexToEntY24(op->indexed,value) ? mask : 0;
*pixel = (*pixel & ~mask) | value;
}
*/
-CARD32
+uint32_t
IcFetch_external (IcCompositeOperand *op)
{
- CARD32 rgb = (*op[1].fetch) (&op[1]);
- CARD32 a = (*op[2].fetch) (&op[2]);
+ uint32_t rgb = (*op[1].fetch) (&op[1]);
+ uint32_t a = (*op[2].fetch) (&op[2]);
return (rgb & 0xffffff) | (a & 0xff000000);
}
-CARD32
+uint32_t
IcFetcha_external (IcCompositeOperand *op)
{
return (*op[2].fetch) (&op[2]);
}
void
-IcStore_external (IcCompositeOperand *op, CARD32 value)
+IcStore_external (IcCompositeOperand *op, uint32_t value)
{
(*op[1].store) (&op[1], value | 0xff000000);
(*op[2].store) (&op[2], value & 0xff000000);
}
-CARD32
+uint32_t
IcFetch_transform (IcCompositeOperand *op)
{
IcVector v;
int x, y;
int minx, maxx, miny, maxy;
int n;
- CARD32 rtot, gtot, btot, atot;
- CARD32 xerr, yerr;
- CARD32 bits;
+ uint32_t rtot, gtot, btot, atot;
+ uint32_t xerr, yerr;
+ uint32_t bits;
PixRegionBox box;
v.vector[0] = IntToxFixed(op->u.transform.x);
@@ -2478,7 +2478,7 @@ IcFetch_transform (IcCompositeOperand *op)
yerr = xFixed1 - xFixedFrac (v.vector[1]);
for (y = miny; y <= maxy; y++)
{
- CARD32 lrtot = 0, lgtot = 0, lbtot = 0, latot = 0;
+ uint32_t lrtot = 0, lgtot = 0, lbtot = 0, latot = 0;
xerr = xFixed1 - xFixedFrac (v.vector[0]);
for (x = minx; x <= maxx; x++)
@@ -2520,16 +2520,16 @@ IcFetch_transform (IcCompositeOperand *op)
return bits;
}
-CARD32
+uint32_t
IcFetcha_transform (IcCompositeOperand *op)
{
IcVector v;
int x, y;
int minx, maxx, miny, maxy;
int n;
- CARD32 rtot, gtot, btot, atot;
- CARD32 xerr, yerr;
- CARD32 bits;
+ uint32_t rtot, gtot, btot, atot;
+ uint32_t xerr, yerr;
+ uint32_t bits;
PixRegionBox box;
v.vector[0] = IntToxFixed(op->u.transform.x);
@@ -2564,7 +2564,7 @@ IcFetcha_transform (IcCompositeOperand *op)
yerr = xFixed1 - xFixedFrac (v.vector[1]);
for (y = miny; y <= maxy; y++)
{
- CARD32 lrtot = 0, lgtot = 0, lbtot = 0, latot = 0;
+ uint32_t lrtot = 0, lgtot = 0, lbtot = 0, latot = 0;
xerr = xFixed1 - xFixedFrac (v.vector[0]);
for (x = minx; x <= maxx; x++)
{
@@ -2727,8 +2727,8 @@ IcSet_transform (IcCompositeOperand *op, int x, int y)
Bool
IcBuildCompositeOperand (IcImage *image,
IcCompositeOperand op[4],
- INT16 x,
- INT16 y,
+ int16_t x,
+ int16_t y,
Bool transform,
Bool alpha)
{
@@ -2840,18 +2840,18 @@ IcBuildCompositeOperand (IcImage *image,
}
void
-IcCompositeGeneral (CARD8 op,
+IcCompositeGeneral (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height)
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height)
{
IcCompositeOperand src[4],msk[4],dst[4],*pmsk;
IcCompositeOperand *srcPict, *srcAlpha;
diff --git a/pixman/src/icimage.h b/pixman/src/icimage.h
index b41abbb6..af9fa1ad 100644
--- a/pixman/src/icimage.h
+++ b/pixman/src/icimage.h
@@ -56,9 +56,9 @@ typedef union _DevUnion {
#include <X11/Xutil.h>
#define IcIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
-#define IcIntDiv(a,b) (((CARD16) (a) * 255) / (b))
+#define IcIntDiv(a,b) (((uint16_t) (a) * 255) / (b))
-#define IcGet8(v,i) ((CARD16) (CARD8) ((v) >> i))
+#define IcGet8(v,i) ((uint16_t) (uint8_t) ((v) >> i))
/*
* There are two ways of handling alpha -- either as a single unified value or
@@ -69,22 +69,22 @@ typedef union _DevUnion {
*/
#define IcOverU(x,y,i,a,t) ((t) = IcIntMult(IcGet8(y,i),(a),(t)) + IcGet8(x,i),\
- (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
+ (uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
#define IcOverC(x,y,i,a,t) ((t) = IcIntMult(IcGet8(y,i),IcGet8(a,i),(t)) + IcGet8(x,i),\
- (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
+ (uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
-#define IcInU(x,i,a,t) ((CARD32) IcIntMult(IcGet8(x,i),(a),(t)) << (i))
+#define IcInU(x,i,a,t) ((uint32_t) IcIntMult(IcGet8(x,i),(a),(t)) << (i))
-#define IcInC(x,i,a,t) ((CARD32) IcIntMult(IcGet8(x,i),IcGet8(a,i),(t)) << (i))
+#define IcInC(x,i,a,t) ((uint32_t) IcIntMult(IcGet8(x,i),IcGet8(a,i),(t)) << (i))
#define IcGen(x,y,i,ax,ay,t,u,v) ((t) = (IcIntMult(IcGet8(y,i),ay,(u)) + \
IcIntMult(IcGet8(x,i),ax,(v))),\
- (CARD32) ((CARD8) ((t) | \
+ (uint32_t) ((uint8_t) ((t) | \
(0 - ((t) >> 8)))) << (i))
#define IcAdd(x,y,i,t) ((t) = IcGet8(x,i) + IcGet8(y,i), \
- (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
+ (uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
/*
typedef struct _IndexFormat {
@@ -98,8 +98,8 @@ typedef struct _IndexFormat {
/*
typedef struct _IcFormat {
- CARD32 id;
- CARD32 format;
+ uint32_t id;
+ uint32_t format;
unsigned char type;
unsigned char depth;
DirectFormatRec direct;
@@ -155,13 +155,13 @@ struct _IcImage {
#define IC_MAX_INDEXED 256 /* XXX depth must be <= 8 */
#if IC_MAX_INDEXED <= 256
-typedef CARD8 IcIndexType;
+typedef uint8_t IcIndexType;
#endif
/* XXX: We're not supporting indexed operations, right?
typedef struct _IcIndexed {
Bool color;
- CARD32 rgba[IC_MAX_INDEXED];
+ uint32_t rgba[IC_MAX_INDEXED];
IcIndexType ent[32768];
} IcIndexedRec, *IcIndexedPtr;
*/
@@ -203,10 +203,10 @@ IcValidatePicture (PicturePtr pPicture,
Bool
IcClipPicture (PixRegion *region,
IcImage *image,
- INT16 xReg,
- INT16 yReg,
- INT16 xPict,
- INT16 yPict);
+ int16_t xReg,
+ int16_t yReg,
+ int16_t xPict,
+ int16_t yPict);
*/
Bool
@@ -214,14 +214,14 @@ IcComputeCompositeRegion (PixRegion *region,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height);
/*
Bool
@@ -230,12 +230,12 @@ IcPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
/*
void
-IcGlyphs (CARD8 op,
+IcGlyphs (uint8_t op,
PicturePtr pSrc,
PicturePtr pDst,
PictFormatPtr maskFormat,
- INT16 xSrc,
- INT16 ySrc,
+ int16_t xSrc,
+ int16_t ySrc,
int nlist,
GlyphListPtr list,
GlyphPtr *glyphs);
@@ -243,7 +243,7 @@ IcGlyphs (CARD8 op,
/*
void
-IcCompositeRects (CARD8 op,
+IcCompositeRects (uint8_t op,
PicturePtr pDst,
xRenderColor *color,
int nRect,
@@ -253,26 +253,26 @@ IcCompositeRects (CARD8 op,
IcImage *
IcCreateAlphaPicture (IcImage *dst,
IcFormat *format,
- CARD16 width,
- CARD16 height);
+ uint16_t width,
+ uint16_t height);
-typedef void (*CompositeFunc) (CARD8 op,
+typedef void (*CompositeFunc) (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height);
typedef struct _IcCompositeOperand IcCompositeOperand;
-typedef CARD32 (*IcCompositeFetch)(IcCompositeOperand *op);
-typedef void (*IcCompositeStore) (IcCompositeOperand *op, CARD32 value);
+typedef uint32_t (*IcCompositeFetch)(IcCompositeOperand *op);
+typedef void (*IcCompositeStore) (IcCompositeOperand *op, uint32_t value);
typedef void (*IcCompositeStep) (IcCompositeOperand *op);
typedef void (*IcCompositeSet) (IcCompositeOperand *op, int x, int y);
@@ -285,7 +285,7 @@ struct _IcCompositeOperand {
int start_offset;
IcBits *line;
- CARD32 offset;
+ uint32_t offset;
IcStride stride;
int bpp;
} drawable;
@@ -325,7 +325,7 @@ typedef void (*IcCombineFunc) (IcCompositeOperand *src,
extern IcCombineFunc icCombineFunc[];
typedef struct _IcAccessMap {
- CARD32 format;
+ uint32_t format;
IcCompositeFetch fetch;
IcCompositeFetch fetcha;
IcCompositeStore store;
@@ -339,15 +339,15 @@ extern IcAccessMap icAccessMap[];
/* iccompose.c */
typedef struct _IcCompSrc {
- CARD32 value;
- CARD32 alpha;
+ uint32_t value;
+ uint32_t alpha;
} IcCompSrc;
/*
* All compositing operators *
*/
-CARD32
+uint32_t
IcCombineMaskU (IcCompositeOperand *src,
IcCompositeOperand *msk);
@@ -355,21 +355,21 @@ IcCompSrc
IcCombineMaskC (IcCompositeOperand *src,
IcCompositeOperand *msk);
-CARD32
+uint32_t
IcCombineMaskValueC (IcCompositeOperand *src,
IcCompositeOperand *msk);
-CARD32
+uint32_t
IcCombineMaskAlphaU (IcCompositeOperand *src,
IcCompositeOperand *msk);
-CARD32
+uint32_t
IcCombineMaskAlphaC (IcCompositeOperand *src,
IcCompositeOperand *msk);
#if 0
-CARD32
+uint32_t
IcCombineMask (IcCompositeOperand *src,
IcCompositeOperand *msk);
#endif
@@ -506,23 +506,23 @@ IcCombineSaturateC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst);
-CARD8
-IcCombineDisjointOutPart (CARD8 a, CARD8 b);
+uint8_t
+IcCombineDisjointOutPart (uint8_t a, uint8_t b);
-CARD8
-IcCombineDisjointInPart (CARD8 a, CARD8 b);
+uint8_t
+IcCombineDisjointInPart (uint8_t a, uint8_t b);
void
IcCombineDisjointGeneralU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine);
+ uint8_t combine);
void
IcCombineDisjointGeneralC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine);
+ uint8_t combine);
void
IcCombineDisjointOverU (IcCompositeOperand *src,
@@ -613,24 +613,24 @@ IcCombineDisjointXorC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst);
-CARD8
-IcCombineConjointOutPart (CARD8 a, CARD8 b);
+uint8_t
+IcCombineConjointOutPart (uint8_t a, uint8_t b);
-CARD8
-IcCombineConjointInPart (CARD8 a, CARD8 b);
+uint8_t
+IcCombineConjointInPart (uint8_t a, uint8_t b);
void
IcCombineConjointGeneralU (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine);
+ uint8_t combine);
void
IcCombineConjointGeneralC (IcCompositeOperand *src,
IcCompositeOperand *msk,
IcCompositeOperand *dst,
- CARD8 combine);
+ uint8_t combine);
void
IcCombineConjointOverU (IcCompositeOperand *src,
@@ -725,434 +725,434 @@ IcCombineConjointXorC (IcCompositeOperand *src,
* All fetch functions
*/
-CARD32
+uint32_t
IcFetch_a8r8g8b8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_x8r8g8b8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a8b8g8r8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_x8b8g8r8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_r8g8b8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_b8g8r8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_r5g6b5 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_b5g6r5 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a1r5g5b5 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_x1r5g5b5 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a1b5g5r5 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_x1b5g5r5 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a4r4g4b4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_x4r4g4b4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a4b4g4r4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_x4b4g4r4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetcha_a8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_r3g3b2 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_b2g3r3 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a2r2g2b2 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a2b2g2r2 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_c8 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetcha_a4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_r1g2b1 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_b1g2r1 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a1r1g1b1 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a1b1g1r1 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_c4 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_a1 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetcha_a1 (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_g1 (IcCompositeOperand *op);
void
-IcStore_a8r8g8b8 (IcCompositeOperand *op, CARD32 value);
+IcStore_a8r8g8b8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_x8r8g8b8 (IcCompositeOperand *op, CARD32 value);
+IcStore_x8r8g8b8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a8b8g8r8 (IcCompositeOperand *op, CARD32 value);
+IcStore_a8b8g8r8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_x8b8g8r8 (IcCompositeOperand *op, CARD32 value);
+IcStore_x8b8g8r8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_r8g8b8 (IcCompositeOperand *op, CARD32 value);
+IcStore_r8g8b8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_b8g8r8 (IcCompositeOperand *op, CARD32 value);
+IcStore_b8g8r8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_r5g6b5 (IcCompositeOperand *op, CARD32 value);
+IcStore_r5g6b5 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_b5g6r5 (IcCompositeOperand *op, CARD32 value);
+IcStore_b5g6r5 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a1r5g5b5 (IcCompositeOperand *op, CARD32 value);
+IcStore_a1r5g5b5 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_x1r5g5b5 (IcCompositeOperand *op, CARD32 value);
+IcStore_x1r5g5b5 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a1b5g5r5 (IcCompositeOperand *op, CARD32 value);
+IcStore_a1b5g5r5 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_x1b5g5r5 (IcCompositeOperand *op, CARD32 value);
+IcStore_x1b5g5r5 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a4r4g4b4 (IcCompositeOperand *op, CARD32 value);
+IcStore_a4r4g4b4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_x4r4g4b4 (IcCompositeOperand *op, CARD32 value);
+IcStore_x4r4g4b4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a4b4g4r4 (IcCompositeOperand *op, CARD32 value);
+IcStore_a4b4g4r4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_x4b4g4r4 (IcCompositeOperand *op, CARD32 value);
+IcStore_x4b4g4r4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a8 (IcCompositeOperand *op, CARD32 value);
+IcStore_a8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_r3g3b2 (IcCompositeOperand *op, CARD32 value);
+IcStore_r3g3b2 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_b2g3r3 (IcCompositeOperand *op, CARD32 value);
+IcStore_b2g3r3 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a2r2g2b2 (IcCompositeOperand *op, CARD32 value);
+IcStore_a2r2g2b2 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_c8 (IcCompositeOperand *op, CARD32 value);
+IcStore_c8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_g8 (IcCompositeOperand *op, CARD32 value);
+IcStore_g8 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a4 (IcCompositeOperand *op, CARD32 value);
+IcStore_a4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_r1g2b1 (IcCompositeOperand *op, CARD32 value);
+IcStore_r1g2b1 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_b1g2r1 (IcCompositeOperand *op, CARD32 value);
+IcStore_b1g2r1 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a1r1g1b1 (IcCompositeOperand *op, CARD32 value);
+IcStore_a1r1g1b1 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a1b1g1r1 (IcCompositeOperand *op, CARD32 value);
+IcStore_a1b1g1r1 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_c4 (IcCompositeOperand *op, CARD32 value);
+IcStore_c4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_g4 (IcCompositeOperand *op, CARD32 value);
+IcStore_g4 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_a1 (IcCompositeOperand *op, CARD32 value);
+IcStore_a1 (IcCompositeOperand *op, uint32_t value);
void
-IcStore_g1 (IcCompositeOperand *op, CARD32 value);
+IcStore_g1 (IcCompositeOperand *op, uint32_t value);
-CARD32
+uint32_t
IcFetch_external (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetch_transform (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetcha_transform (IcCompositeOperand *op);
-CARD32
+uint32_t
IcFetcha_external (IcCompositeOperand *op);
void
-IcStore_external (IcCompositeOperand *op, CARD32 value);
+IcStore_external (IcCompositeOperand *op, uint32_t value);
/*
Bool
IcBuildOneCompositeOperand (PicturePtr pPict,
IcCompositeOperand *op,
- INT16 x,
- INT16 y);
+ int16_t x,
+ int16_t y);
*/
Bool
IcBuildCompositeOperand (IcImage *image,
IcCompositeOperand op[4],
- INT16 x,
- INT16 y,
+ int16_t x,
+ int16_t y,
Bool transform,
Bool alpha);
void
-IcCompositeGeneral (CARD8 op,
+IcCompositeGeneral (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ int16_t xSrc,
+ int16_t ySrc,
+ int16_t xMask,
+ int16_t yMask,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height);
/* icimage.c */
-CARD32
-IcOver (CARD32 x, CARD32 y);
+uint32_t
+IcOver (uint32_t x, uint32_t y);
-CARD32
-IcOver24 (CARD32 x, CARD32 y);
+uint32_t
+IcOver24 (uint32_t x, uint32_t y);
-CARD32
-IcIn (CARD32 x, CARD8 y);
+uint32_t
+IcIn (uint32_t x, uint8_t y);
void
-IcCompositeSolidMask_nx8x8888 (CARD8 op,
+IcCompositeSolidMask_nx8x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSolidMask_nx8x0888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSolidMask_nx8888x8888C (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSolidMask_nx8x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSolidMask_nx8888x0565C (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrc_8888x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrc_8888x0888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrc_8888x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrc_0565x0565 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrcAdd_8000x8000 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrcAdd_8888x8888 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSrcAdd_1000x1000 (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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 (CARD8 op,
+IcCompositeSolidMask_nx1xn (uint8_t op,
IcImage *iSrc,
IcImage *iMask,
IcImage *iDst,
- INT16 xSrc,
- INT16 ySrc,
- INT16 xMask,
- INT16 yMask,
- INT16 xDst,
- INT16 yDst,
- CARD16 width,
- CARD16 height);
+ 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_ */
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
index 1ca22527..5f11bb3a 100644
--- a/pixman/src/icint.h
+++ b/pixman/src/icint.h
@@ -21,8 +21,8 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef _ICINT_H_
-#define _ICINT_H_
+#ifndef ICINT_H_INCLUDED
+#define ICINT_H_INCLUDED
#include "ic.h"
@@ -180,7 +180,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
#define IcPatternOffset(o,t) ((o) ^ (IcPatternOffsetBits & ~(sizeof (t) - 1)))
-#define IcPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
+#define IcPtrOffset(p,o,t) ((t *) ((uint8_t *) (p) + (o)))
#define IcSelectPatternPart(xor,o,t) ((xor) >> (IcPatternOffset (o,t) << 3))
#define IcStorePart(dst,off,t,xor) (*IcPtrOffset(dst,off,t) = \
IcSelectPart(xor,off,t))
@@ -231,110 +231,110 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
#if IC_SHIFT == 6
#define IcDoLeftMaskByteRRop6Cases(dst,xor) \
case (sizeof (IcBits) - 7) | (1 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 7) | (2 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 7) | (3 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
break; \
case (sizeof (IcBits) - 7) | (4 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 7) | (5 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
break; \
case (sizeof (IcBits) - 7) | (6 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 7): \
- IcStorePart(dst,sizeof (IcBits) - 7,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD32,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 7,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
break; \
case (sizeof (IcBits) - 6) | (1 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 6) | (2 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
break; \
case (sizeof (IcBits) - 6) | (3 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 6) | (4 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
break; \
case (sizeof (IcBits) - 6) | (5 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 6): \
- IcStorePart(dst,sizeof (IcBits) - 6,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD32,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 6,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
break; \
case (sizeof (IcBits) - 5) | (1 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 5,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 5) | (2 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 5,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 5) | (3 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 5,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
break; \
case (sizeof (IcBits) - 5) | (4 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 5,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 5): \
- IcStorePart(dst,sizeof (IcBits) - 5,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD32,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 5,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
break; \
case (sizeof (IcBits) - 4) | (1 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 4) | (2 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
break; \
case (sizeof (IcBits) - 4) | (3 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD16,xor); \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint16_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 4): \
- IcStorePart(dst,sizeof (IcBits) - 4,CARD32,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 4,uint32_t,xor); \
break;
#define IcDoRightMaskByteRRop6Cases(dst,xor) \
case 4: \
- IcStorePart(dst,0,CARD32,xor); \
+ IcStorePart(dst,0,uint32_t,xor); \
break; \
case 5: \
- IcStorePart(dst,0,CARD32,xor); \
- IcStorePart(dst,4,CARD8,xor); \
+ IcStorePart(dst,0,uint32_t,xor); \
+ IcStorePart(dst,4,uint8_t,xor); \
break; \
case 6: \
- IcStorePart(dst,0,CARD32,xor); \
- IcStorePart(dst,4,CARD16,xor); \
+ IcStorePart(dst,0,uint32_t,xor); \
+ IcStorePart(dst,4,uint16_t,xor); \
break; \
case 7: \
- IcStorePart(dst,0,CARD32,xor); \
- IcStorePart(dst,4,CARD16,xor); \
- IcStorePart(dst,6,CARD8,xor); \
+ IcStorePart(dst,0,uint32_t,xor); \
+ IcStorePart(dst,4,uint16_t,xor); \
+ IcStorePart(dst,6,uint8_t,xor); \
break;
#else
#define IcDoLeftMaskByteRRop6Cases(dst,xor)
@@ -345,22 +345,22 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
switch (lb) { \
IcDoLeftMaskByteRRop6Cases(dst,xor) \
case (sizeof (IcBits) - 3) | (1 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 3,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 3,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 3) | (2 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 3,CARD8,xor); \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 3,uint8_t,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
break; \
case (sizeof (IcBits) - 2) | (1 << (IC_SHIFT - 3)): \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint8_t,xor); \
break; \
case sizeof (IcBits) - 3: \
- IcStorePart(dst,sizeof (IcBits) - 3,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 3,uint8_t,xor); \
case sizeof (IcBits) - 2: \
- IcStorePart(dst,sizeof (IcBits) - 2,CARD16,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 2,uint16_t,xor); \
break; \
case sizeof (IcBits) - 1: \
- IcStorePart(dst,sizeof (IcBits) - 1,CARD8,xor); \
+ IcStorePart(dst,sizeof (IcBits) - 1,uint8_t,xor); \
break; \
default: \
*dst = IcDoMaskRRop(*dst, and, xor, l); \
@@ -372,14 +372,14 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
#define IcDoRightMaskByteRRop(dst,rb,r,and,xor) { \
switch (rb) { \
case 1: \
- IcStorePart(dst,0,CARD8,xor); \
+ IcStorePart(dst,0,uint8_t,xor); \
break; \
case 2: \
- IcStorePart(dst,0,CARD16,xor); \
+ IcStorePart(dst,0,uint16_t,xor); \
break; \
case 3: \
- IcStorePart(dst,0,CARD16,xor); \
- IcStorePart(dst,2,CARD8,xor); \
+ IcStorePart(dst,0,uint16_t,xor); \
+ IcStorePart(dst,2,uint8_t,xor); \
break; \
IcDoRightMaskByteRRop6Cases(dst,xor) \
default: \
@@ -416,15 +416,15 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
*/
#define IcLaneCase1(n,a,o) ((n) == 0x01 ? \
- (*(CARD8 *) ((a)+IcPatternOffset(o,CARD8)) = \
+ (*(uint8_t *) ((a)+IcPatternOffset(o,uint8_t)) = \
fgxor) : 0)
#define IcLaneCase2(n,a,o) ((n) == 0x03 ? \
- (*(CARD16 *) ((a)+IcPatternOffset(o,CARD16)) = \
+ (*(uint16_t *) ((a)+IcPatternOffset(o,uint16_t)) = \
fgxor) : \
((void)IcLaneCase1((n)&1,a,o), \
IcLaneCase1((n)>>1,a,(o)+1)))
#define IcLaneCase4(n,a,o) ((n) == 0x0f ? \
- (*(CARD32 *) ((a)+IcPatternOffset(o,CARD32)) = \
+ (*(uint32_t *) ((a)+IcPatternOffset(o,uint32_t)) = \
fgxor) : \
((void)IcLaneCase2((n)&3,a,o), \
IcLaneCase2((n)>>2,a,(o)+2)))
@@ -433,11 +433,11 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
IcLaneCase4((n)>>4,a,(o)+4)))
#if IC_SHIFT == 6
-#define IcLaneCase(n,a) IcLaneCase8(n,(CARD8 *) (a),0)
+#define IcLaneCase(n,a) IcLaneCase8(n,(uint8_t *) (a),0)
#endif
#if IC_SHIFT == 5
-#define IcLaneCase(n,a) IcLaneCase4(n,(CARD8 *) (a),0)
+#define IcLaneCase(n,a) IcLaneCase4(n,(uint8_t *) (a),0)
#endif
/* Rotate a filled pixel value to the specified alignement */
@@ -710,7 +710,7 @@ typedef struct _IcPixels {
} IcPixels;
/* XXX: This is to avoid including colormap.h from the server includes */
-typedef CARD32 Pixel;
+typedef uint32_t Pixel;
/* icutil.c */
IcBits
@@ -929,9 +929,9 @@ typedef long long int xFixed_32_32;
# endif
#endif
-typedef CARD32 xFixed_1_31;
-typedef CARD32 xFixed_1_16;
-typedef INT32 xFixed_16_16;
+typedef uint32_t xFixed_1_31;
+typedef uint32_t xFixed_1_16;
+typedef int32_t xFixed_16_16;
/*
* An unadorned "xFixed" is the same as xFixed_16_16,
@@ -975,4 +975,4 @@ typedef xFixed_16_16 xFixed;
#endif /* _PICTURE_H_ */
-#endif
+#endif /* ICINT_H_INCLUDED */