selective s/Ic/fb/g.

I took out the list of functions because it was ridiculously long.
This commit is contained in:
Jeff Muizelaar 2005-06-24 18:28:19 +00:00
parent 43e3e7eeff
commit 42fc090745
10 changed files with 412 additions and 396 deletions

View file

@ -1,3 +1,19 @@
2005-06-24 Jeff Muizelaar <jeff@infidigm.net>
* src/ic.c:
* src/icblt.c:
* src/icbltone.c:
* src/iccompose.c:
* src/icimage.h:
* src/icint.h:
* src/icrop.h:
* src/icstipple.c:
* src/icutil.c:
selective s/Ic/fb/g.
I took out the list of functions because it was ridiculously long.
2005-06-24 Jeff Muizelaar <jeff@infidigm.net>
* src/ic.c: (pixman_compositeSrcAdd_1000x1000),

View file

@ -51,7 +51,7 @@
#endif
static uint32_t
IcOver (uint32_t x, uint32_t y)
fbOver (uint32_t x, uint32_t y)
{
uint16_t a = ~x >> 24;
uint16_t t;
@ -65,7 +65,7 @@ IcOver (uint32_t x, uint32_t y)
}
static uint32_t
IcOver24 (uint32_t x, uint32_t y)
fbOver24 (uint32_t x, uint32_t y)
{
uint16_t a = ~x >> 24;
uint16_t t;
@ -78,7 +78,7 @@ IcOver24 (uint32_t x, uint32_t y)
}
static uint32_t
IcIn (uint32_t x, uint8_t y)
fbIn (uint32_t x, uint8_t y)
{
uint16_t a = y;
uint16_t t;
@ -91,7 +91,7 @@ IcIn (uint32_t x, uint8_t y)
return m|n|o|p;
}
#define IcComposeGetSolid(image, bits) { \
#define fbComposeGetSolid(image, bits) { \
FbBits *__bits__; \
IcStride __stride__; \
int __bpp__; \
@ -117,7 +117,7 @@ IcIn (uint32_t x, uint8_t y)
(bits) |= 0xff000000; \
}
#define IcComposeGetStart(image,x,y,type,stride,line,mul) {\
#define fbComposeGetStart(image,x,y,type,stride,line,mul) {\
FbBits *__bits__; \
IcStride __stride__; \
int __bpp__; \
@ -154,15 +154,15 @@ pixman_compositeSolidMask_nx8x8888 (pixman_operator_t op,
IcStride dstStride, maskStride;
uint16_t w;
IcComposeGetSolid(iSrc, src);
fbComposeGetSolid(iSrc, src);
dstMask = IcFullMask (iDst->pixels->depth);
srca = src >> 24;
if (src == 0)
return;
IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
IcComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
while (height--)
{
@ -180,12 +180,12 @@ pixman_compositeSolidMask_nx8x8888 (pixman_operator_t op,
if (srca == 0xff)
*dst = src & dstMask;
else
*dst = IcOver (src, *dst) & dstMask;
*dst = fbOver (src, *dst) & dstMask;
}
else if (m)
{
d = IcIn (src, m);
*dst = IcOver (d, *dst) & dstMask;
d = fbIn (src, m);
*dst = fbOver (d, *dst) & dstMask;
}
dst++;
}
@ -213,15 +213,15 @@ pixman_compositeSolidMask_nx8888x8888C (pixman_operator_t op,
uint16_t w;
uint32_t m, n, o, p;
IcComposeGetSolid(iSrc, src);
fbComposeGetSolid(iSrc, src);
dstMask = IcFullMask (iDst->pixels->depth);
srca = src >> 24;
if (src == 0)
return;
IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
IcComposeGetStart (iMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (iMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
while (height--)
{
@ -239,7 +239,7 @@ pixman_compositeSolidMask_nx8888x8888C (pixman_operator_t op,
if (srca == 0xff)
*dst = src & dstMask;
else
*dst = IcOver (src, *dst) & dstMask;
*dst = fbOver (src, *dst) & dstMask;
}
else if (ma)
{
@ -286,14 +286,14 @@ pixman_compositeSolidMask_nx8x0888 (pixman_operator_t op,
IcStride dstStride, maskStride;
uint16_t w;
IcComposeGetSolid(iSrc, src);
fbComposeGetSolid(iSrc, src);
srca = src >> 24;
if (src == 0)
return;
IcComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
IcComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
fbComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
while (height--)
{
@ -313,13 +313,13 @@ pixman_compositeSolidMask_nx8x0888 (pixman_operator_t op,
else
{
d = Fetch24(dst);
d = IcOver24 (src, d);
d = fbOver24 (src, d);
}
Store24(dst,d);
}
else if (m)
{
d = IcOver24 (IcIn(src,m), Fetch24(dst));
d = fbOver24 (fbIn(src,m), Fetch24(dst));
Store24(dst,d);
}
dst += 3;
@ -348,14 +348,14 @@ pixman_compositeSolidMask_nx8x0565 (pixman_operator_t op,
IcStride dstStride, maskStride;
uint16_t w;
IcComposeGetSolid(iSrc, src);
fbComposeGetSolid(iSrc, src);
srca = src >> 24;
if (src == 0)
return;
IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
IcComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
fbComposeGetStart (iMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
while (height--)
{
@ -375,14 +375,14 @@ pixman_compositeSolidMask_nx8x0565 (pixman_operator_t op,
else
{
d = *dst;
d = IcOver24 (src, cvt0565to8888(d));
d = fbOver24 (src, cvt0565to8888(d));
}
*dst = cvt8888to0565(d);
}
else if (m)
{
d = *dst;
d = IcOver24 (IcIn(src,m), cvt0565to8888(d));
d = fbOver24 (fbIn(src,m), cvt0565to8888(d));
*dst = cvt8888to0565(d);
}
dst++;
@ -413,7 +413,7 @@ pixman_compositeSolidMask_nx8888x0565C (pixman_operator_t op,
uint16_t w;
uint32_t m, n, o;
IcComposeGetSolid(iSrc, src);
fbComposeGetSolid(iSrc, src);
srca = src >> 24;
if (src == 0)
@ -421,8 +421,8 @@ pixman_compositeSolidMask_nx8888x0565C (pixman_operator_t op,
src16 = cvt8888to0565(src);
IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
IcComposeGetStart (iMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
fbComposeGetStart (iMask, xMask, yMask, uint32_t, maskStride, maskLine, 1);
while (height--)
{
@ -444,7 +444,7 @@ pixman_compositeSolidMask_nx8888x0565C (pixman_operator_t op,
else
{
d = *dst;
d = IcOver24 (src, cvt0565to8888(d));
d = fbOver24 (src, cvt0565to8888(d));
*dst = cvt8888to0565(d);
}
}
@ -483,8 +483,8 @@ pixman_compositeSrc_8888x8888 (pixman_operator_t op,
uint8_t a;
uint16_t w;
IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
dstMask = IcFullMask (iDst->pixels->depth);
@ -503,7 +503,7 @@ pixman_compositeSrc_8888x8888 (pixman_operator_t op,
if (a == 0xff)
*dst = s & dstMask;
else if (a)
*dst = IcOver (s, *dst) & dstMask;
*dst = fbOver (s, *dst) & dstMask;
dst++;
}
}
@ -530,8 +530,8 @@ pixman_compositeSrc_8888x0888 (pixman_operator_t op,
IcStride dstStride, srcStride;
uint16_t w;
IcComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 3);
fbComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
while (height--)
{
@ -550,7 +550,7 @@ pixman_compositeSrc_8888x0888 (pixman_operator_t op,
if (a == 0xff)
d = s;
else
d = IcOver24 (s, Fetch24(dst));
d = fbOver24 (s, Fetch24(dst));
Store24(dst,d);
}
dst += 3;
@ -579,8 +579,8 @@ pixman_compositeSrc_8888x0565 (pixman_operator_t op,
IcStride dstStride, srcStride;
uint16_t w;
IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
fbComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
while (height--)
{
@ -601,7 +601,7 @@ pixman_compositeSrc_8888x0565 (pixman_operator_t op,
else
{
d = *dst;
d = IcOver24 (s, cvt0565to8888(d));
d = fbOver24 (s, cvt0565to8888(d));
}
*dst = cvt8888to0565(d);
}
@ -629,9 +629,9 @@ pixman_compositeSrc_0565x0565 (pixman_operator_t op,
IcStride dstStride, srcStride;
uint16_t w;
IcComposeGetStart (iSrc, xSrc, ySrc, uint16_t, srcStride, srcLine, 1);
fbComposeGetStart (iSrc, xSrc, ySrc, uint16_t, srcStride, srcLine, 1);
IcComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint16_t, dstStride, dstLine, 1);
while (height--)
{
@ -667,8 +667,8 @@ pixman_compositeSrcAdd_8000x8000 (pixman_operator_t op,
uint8_t s, d;
uint16_t t;
IcComposeGetStart (iSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
IcComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
fbComposeGetStart (iSrc, xSrc, ySrc, uint8_t, srcStride, srcLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
while (height--)
{
@ -718,8 +718,8 @@ pixman_compositeSrcAdd_8888x8888 (pixman_operator_t op,
uint16_t t;
uint32_t m,n,o,p;
IcComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
IcComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (iSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
fbComposeGetStart (iDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
while (height--)
{
@ -777,7 +777,7 @@ pixman_compositeSrcAdd_1000x1000 (pixman_operator_t op,
IcGetPixels(iDst->pixels, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
IcBlt (srcBits + srcStride * (ySrc + srcYoff),
fbBlt (srcBits + srcStride * (ySrc + srcYoff),
srcStride,
xSrc + srcXoff,
@ -818,7 +818,7 @@ pixman_compositeSolidMask_nx1xn (pixman_operator_t op,
int maskXoff, maskYoff;
FbBits src;
IcComposeGetSolid(iSrc, src);
fbComposeGetSolid(iSrc, src);
if ((src & 0xff000000) != 0xff000000)
{
@ -840,9 +840,9 @@ pixman_compositeSolidMask_nx1xn (pixman_operator_t op,
break;
}
src = IcReplicatePixel (src, dstBpp);
src = fbReplicatePixel (src, dstBpp);
IcBltOne (maskBits + maskStride * (yMask + maskYoff),
fbBltOne (maskBits + maskStride * (yMask + maskYoff),
maskStride,
xMask + maskXoff,

View file

@ -37,7 +37,7 @@
}
void
IcBlt (FbBits *srcLine,
fbBlt (FbBits *srcLine,
IcStride srcStride,
int srcX,
@ -91,7 +91,7 @@ IcBlt (FbBits *srcLine,
#ifdef FB_24BIT
if (bpp == 24 && !IcCheck24Pix (pm))
{
IcBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
width, height, alu, pm, reverse, upsidedown);
return;
}
@ -173,7 +173,7 @@ IcBlt (FbBits *srcLine,
#if 0
/*
* This provides some speedup on screen->screen blts
* over the PCI bus, usually about 10%. But Ic
* over the PCI bus, usually about 10%. But fb
* isn't usually used for this operation...
*/
if (_ca2 + 1 == 0 && _cx2 == 0)
@ -350,7 +350,7 @@ getPixel (char *src, int x)
#endif
static void
IcBlt24Line (FbBits *src,
fbBlt24Line (FbBits *src,
int srcX,
FbBits *dst,
@ -564,7 +564,7 @@ IcBlt24Line (FbBits *src,
}
void
IcBlt24 (FbBits *srcLine,
fbBlt24 (FbBits *srcLine,
IcStride srcStride,
int srcX,
@ -590,7 +590,7 @@ IcBlt24 (FbBits *srcLine,
}
while (height--)
{
IcBlt24Line (srcLine, srcX, dstLine, dstX, width, alu, pm, reverse);
fbBlt24Line (srcLine, srcX, dstLine, dstX, width, alu, pm, reverse);
srcLine += srcStride;
dstLine += dstStride;
}
@ -608,7 +608,7 @@ IcBlt24 (FbBits *srcLine,
*/
void
IcBltOdd (FbBits *srcLine,
fbBltOdd (FbBits *srcLine,
IcStride srcStrideEven,
IcStride srcStrideOdd,
int srcXEven,
@ -781,7 +781,7 @@ IcBltOdd (FbBits *srcLine,
#ifdef FB_24BIT
void
IcBltOdd24 (FbBits *srcLine,
fbBltOdd24 (FbBits *srcLine,
IcStride srcStrideEven,
IcStride srcStrideOdd,
int srcXEven,
@ -805,7 +805,7 @@ IcBltOdd24 (FbBits *srcLine,
{
if (even)
{
IcBlt24Line (srcLine, srcXEven, dstLine, dstXEven,
fbBlt24Line (srcLine, srcXEven, dstLine, dstXEven,
width, alu, pm, 0);
srcLine += srcStrideEven;
dstLine += dstStrideEven;
@ -813,7 +813,7 @@ IcBltOdd24 (FbBits *srcLine,
}
else
{
IcBlt24Line (srcLine, srcXOdd, dstLine, dstXOdd,
fbBlt24Line (srcLine, srcXOdd, dstLine, dstXOdd,
width, alu, pm, 0);
srcLine += srcStrideOdd;
dstLine += dstStrideOdd;
@ -830,7 +830,7 @@ IcBltOdd24 (FbBits *srcLine,
#if FB_STIP_SHIFT != FB_SHIFT
void
IcSetBltOdd (IcStip *stip,
fbSetBltOdd (IcStip *stip,
IcStride stipStride,
int srcX,
FbBits **bits,
@ -872,7 +872,7 @@ IcSetBltOdd (IcStip *stip,
#endif
void
IcBltStip (IcStip *src,
fbBltStip (IcStip *src,
IcStride srcStride, /* in IcStip units, not FbBits units */
int srcX,
@ -903,12 +903,12 @@ IcBltStip (IcStip *src,
dst += dstX >> FB_STIP_SHIFT;
dstX &= FB_STIP_MASK;
IcSetBltOdd (src, srcStride, srcX,
fbSetBltOdd (src, srcStride, srcX,
&s,
&srcStrideEven, &srcStrideOdd,
&srcXEven, &srcXOdd);
IcSetBltOdd (dst, dstStride, dstX,
fbSetBltOdd (dst, dstStride, dstX,
&d,
&dstStrideEven, &dstStrideOdd,
&dstXEven, &dstXOdd);
@ -916,7 +916,7 @@ IcBltStip (IcStip *src,
#ifdef FB_24BIT
if (bpp == 24 && !IcCheck24Pix (pm))
{
IcBltOdd24 (s, srcStrideEven, srcStrideOdd,
fbBltOdd24 (s, srcStrideEven, srcStrideOdd,
srcXEven, srcXOdd,
d, dstStrideEven, dstStrideOdd,
@ -927,7 +927,7 @@ IcBltStip (IcStip *src,
else
#endif
{
IcBltOdd (s, srcStrideEven, srcStrideOdd,
fbBltOdd (s, srcStrideEven, srcStrideOdd,
srcXEven, srcXOdd,
d, dstStrideEven, dstStrideOdd,
@ -939,7 +939,7 @@ IcBltStip (IcStip *src,
else
#endif
{
IcBlt ((FbBits *) src, IcStipStrideToBitsStride (srcStride),
fbBlt ((FbBits *) src, IcStipStrideToBitsStride (srcStride),
srcX,
(FbBits *) dst, IcStipStrideToBitsStride (dstStride),
dstX,

View file

@ -76,7 +76,7 @@
#endif
#if FB_SHIFT == 6
static uint8_t const Ic8Lane[256] = {
static uint8_t const fb8Lane[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
@ -93,49 +93,49 @@ static uint8_t const Ic8Lane[256] = {
242, 243, 244,245,246,247,248,249,250,251,252,253,254,255,
};
static uint8_t const Ic16Lane[256] = {
static uint8_t const fb16Lane[256] = {
0x00, 0x03, 0x0c, 0x0f,
0x30, 0x33, 0x3c, 0x3f,
0xc0, 0xc3, 0xcc, 0xcf,
0xf0, 0xf3, 0xfc, 0xff,
};
static uint8_t const Ic32Lane[16] = {
static uint8_t const fb32Lane[16] = {
0x00, 0x0f, 0xf0, 0xff,
};
#endif
#if FB_SHIFT == 5
static uint8_t const Ic8Lane[16] = {
static uint8_t const fb8Lane[16] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
};
static uint8_t const Ic16Lane[16] = {
static uint8_t const fb16Lane[16] = {
0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static uint8_t const Ic32Lane[16] = {
static uint8_t const fb32Lane[16] = {
0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
#endif
static const uint8_t *
IcLaneTable(int bpp)
fbLaneTable(int bpp)
{
switch (bpp) {
case 8:
return Ic8Lane;
return fb8Lane;
case 16:
return Ic16Lane;
return fb16Lane;
case 32:
return Ic32Lane;
return fb32Lane;
}
return 0;
}
#endif
void
IcBltOne (IcStip *src,
fbBltOne (IcStip *src,
IcStride srcStride, /* IcStip units per scanline */
int srcX, /* bit position of source */
FbBits *dst,
@ -168,14 +168,14 @@ IcBltOne (IcStip *src,
int srcinc; /* source units consumed */
int endNeedsLoad = 0; /* need load for endmask */
#ifndef FBNOPIXADDR
const uint8_t *IcLane;
const uint8_t *fbLane;
#endif
int startbyte, endbyte;
#ifdef FB_24BIT
if (dstBpp == 24)
{
IcBltOne24 (src, srcStride, srcX,
fbBltOne24 (src, srcStride, srcX,
dst, dstStride, dstX, dstBpp,
width, height,
fgand, fgxor, bgand, bgxor);
@ -235,11 +235,11 @@ IcBltOne (IcStip *src,
*/
icbits = 0; /* unused */
if (pixelsPerDst <= 8)
icbits = IcStippleTable(pixelsPerDst);
icbits = fbStippleTable(pixelsPerDst);
#ifndef FBNOPIXADDR
IcLane = 0;
fbLane = 0;
if (transparent && fgand == 0 && dstBpp >= 8)
IcLane = IcLaneTable(dstBpp);
fbLane = fbLaneTable(dstBpp);
#endif
/*
@ -301,9 +301,9 @@ IcBltOne (IcStip *src,
#endif
mask = icbits[IcLeftStipBits(bits,pixelsPerDst)];
#ifndef FBNOPIXADDR
if (IcLane)
if (fbLane)
{
IcTransparentSpan (dst, mask & startmask, fgxor, 1);
fbTransparentSpan (dst, mask & startmask, fgxor, 1);
}
else
#endif
@ -342,11 +342,11 @@ IcBltOne (IcStip *src,
else
{
#ifndef FBNOPIXADDR
if (IcLane)
if (fbLane)
{
while (bits && n)
{
switch (IcLane[IcLeftStipBits(bits,pixelsPerDst)]) {
switch (fbLane[IcLeftStipBits(bits,pixelsPerDst)]) {
LaneCases((uint8_t *) dst);
}
bits = IcStipLeft(bits,pixelsPerDst);
@ -399,9 +399,9 @@ IcBltOne (IcStip *src,
#endif
mask = icbits[IcLeftStipBits(bits,pixelsPerDst)];
#ifndef FBNOPIXADDR
if (IcLane)
if (fbLane)
{
IcTransparentSpan (dst, mask & endmask, fgxor, 1);
fbTransparentSpan (dst, mask & endmask, fgxor, 1);
}
else
#endif
@ -455,7 +455,7 @@ IcBltOne (IcStip *src,
#define IcStip24New(rot) (2 + (rot != 0))
#define IcStip24Len 4
static const FbBits icStipple24Bits[3][1 << IcStip24Len] = {
static const FbBits fbStipple24Bits[3][1 << IcStip24Len] = {
/* rotate 0 */
{
C4_24( 0, 0), C4_24( 1, 0), C4_24( 2, 0), C4_24( 3, 0),
@ -493,7 +493,7 @@ static const FbBits icStipple24Bits[3][1 << IcStip24Len] = {
#define IcStip24New(rot) (1 + (rot == 8))
#endif
static const FbBits icStipple24Bits[3][1 << IcStip24Len] = {
static const FbBits fbStipple24Bits[3][1 << IcStip24Len] = {
/* rotate 0 */
{
C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
@ -527,7 +527,7 @@ static const FbBits icStipple24Bits[3][1 << IcStip24Len] = {
#endif
#define IcFirstStipBits(len,stip) {\
#define fbFirstStipBits(len,stip) {\
int __len = (len); \
if (len <= remain) { \
stip = IcLeftStipBits(bits, len); \
@ -543,17 +543,17 @@ static const FbBits icStipple24Bits[3][1 << IcStip24Len] = {
remain -= __len; \
}
#define IcInitStipBits(offset,len,stip) {\
#define fbInitStipBits(offset,len,stip) {\
bits = IcStipLeft (*src++,offset); \
remain = FB_STIP_UNIT - offset; \
IcFirstStipBits(len,stip); \
fbFirstStipBits(len,stip); \
stip = IcMergeStip24Bits (0, stip, len); \
}
#define IcNextStipBits(rot,stip) {\
#define fbNextStipBits(rot,stip) {\
int __new = IcStip24New(rot); \
IcStip __right; \
IcFirstStipBits(__new, __right); \
fbFirstStipBits(__new, __right); \
stip = IcMergeStip24Bits (stip, __right, __new); \
rot = IcNext24Rot (rot); \
}
@ -568,7 +568,7 @@ static const FbBits icStipple24Bits[3][1 << IcStip24Len] = {
* and text
*/
void
IcBltOne24 (IcStip *srcLine,
fbBltOne24 (IcStip *srcLine,
IcStride srcStride, /* IcStip units per scanline */
int srcX, /* bit position of source */
FbBits *dst,
@ -618,30 +618,30 @@ IcBltOne24 (IcStip *srcLine,
rot = rot0;
src = srcLine;
srcLine += srcStride;
IcInitStipBits (srcX,firstlen, stip);
fbInitStipBits (srcX,firstlen, stip);
if (leftMask)
{
mask = icStipple24Bits[rot >> 3][stip];
mask = fbStipple24Bits[rot >> 3][stip];
*dst = (*dst & ~leftMask) | (IcOpaqueStipple (mask,
IcRot24(fgxor, rot),
IcRot24(bgxor, rot))
& leftMask);
dst++;
IcNextStipBits(rot,stip);
fbNextStipBits(rot,stip);
}
nl = nlMiddle;
while (nl--)
{
mask = icStipple24Bits[rot>>3][stip];
mask = fbStipple24Bits[rot>>3][stip];
*dst = IcOpaqueStipple (mask,
IcRot24(fgxor, rot),
IcRot24(bgxor, rot));
dst++;
IcNextStipBits(rot,stip);
fbNextStipBits(rot,stip);
}
if (rightMask)
{
mask = icStipple24Bits[rot >> 3][stip];
mask = fbStipple24Bits[rot >> 3][stip];
*dst = (*dst & ~rightMask) | (IcOpaqueStipple (mask,
IcRot24(fgxor, rot),
IcRot24(bgxor, rot))
@ -659,33 +659,33 @@ IcBltOne24 (IcStip *srcLine,
rot = rot0;
src = srcLine;
srcLine += srcStride;
IcInitStipBits (srcX, firstlen, stip);
fbInitStipBits (srcX, firstlen, stip);
if (leftMask)
{
if (stip)
{
mask = icStipple24Bits[rot >> 3][stip] & leftMask;
mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
*dst = (*dst & ~mask) | (IcRot24(fgxor, rot) & mask);
}
dst++;
IcNextStipBits (rot, stip);
fbNextStipBits (rot, stip);
}
nl = nlMiddle;
while (nl--)
{
if (stip)
{
mask = icStipple24Bits[rot>>3][stip];
mask = fbStipple24Bits[rot>>3][stip];
*dst = (*dst & ~mask) | (IcRot24(fgxor,rot) & mask);
}
dst++;
IcNextStipBits (rot, stip);
fbNextStipBits (rot, stip);
}
if (rightMask)
{
if (stip)
{
mask = icStipple24Bits[rot >> 3][stip] & rightMask;
mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
*dst = (*dst & ~mask) | (IcRot24(fgxor, rot) & mask);
}
}
@ -699,10 +699,10 @@ IcBltOne24 (IcStip *srcLine,
rot = rot0;
src = srcLine;
srcLine += srcStride;
IcInitStipBits (srcX, firstlen, stip);
fbInitStipBits (srcX, firstlen, stip);
if (leftMask)
{
mask = icStipple24Bits[rot >> 3][stip];
mask = fbStipple24Bits[rot >> 3][stip];
*dst = IcStippleRRopMask (*dst, mask,
IcRot24(fgand, rot),
IcRot24(fgxor, rot),
@ -710,23 +710,23 @@ IcBltOne24 (IcStip *srcLine,
IcRot24(bgxor, rot),
leftMask);
dst++;
IcNextStipBits(rot,stip);
fbNextStipBits(rot,stip);
}
nl = nlMiddle;
while (nl--)
{
mask = icStipple24Bits[rot >> 3][stip];
mask = fbStipple24Bits[rot >> 3][stip];
*dst = IcStippleRRop (*dst, mask,
IcRot24(fgand, rot),
IcRot24(fgxor, rot),
IcRot24(bgand, rot),
IcRot24(bgxor, rot));
dst++;
IcNextStipBits(rot,stip);
fbNextStipBits(rot,stip);
}
if (rightMask)
{
mask = icStipple24Bits[rot >> 3][stip];
mask = fbStipple24Bits[rot >> 3][stip];
*dst = IcStippleRRopMask (*dst, mask,
IcRot24(fgand, rot),
IcRot24(fgxor, rot),

File diff suppressed because it is too large Load diff

View file

@ -314,7 +314,7 @@ typedef struct _IcCompSrc {
} IcCompSrc;
pixman_private int
IcBuildCompositeOperand (pixman_image_t *image,
fbBuildCompositeOperand (pixman_image_t *image,
FbCompositeOperand op[4],
int16_t x,
int16_t y,

View file

@ -146,13 +146,13 @@ typedef int IcStride;
#ifdef FB_DEBUG
extern void IcValidateDrawable(DrawablePtr d);
extern void IcInitializeDrawable(DrawablePtr d);
extern void IcSetBits (IcStip *bits, int stride, IcStip data);
extern void fbValidateDrawable(DrawablePtr d);
extern void fbInitializeDrawable(DrawablePtr d);
extern void fbSetBits (IcStip *bits, int stride, IcStip data);
#define FB_HEAD_BITS (IcStip) (0xbaadf00d)
#define FB_TAIL_BITS (IcStip) (0xbaddf0ad)
#else
#define IcValidateDrawable(d)
#define fbValidateDrawable(d)
#define fdInitializeDrawable(d)
#endif
@ -553,7 +553,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
/*
* Accelerated tiles are power of 2 width <= FB_UNIT
*/
#define IcEvenTile(w) ((w) <= FB_UNIT && IcPowerOfTwo(w))
#define fbEvenTile(w) ((w) <= FB_UNIT && IcPowerOfTwo(w))
/*
* Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
* with dstBpp a power of 2 as well
@ -564,7 +564,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
* icblt.c
*/
pixman_private void
IcBlt (pixman_bits_t *src,
fbBlt (pixman_bits_t *src,
IcStride srcStride,
int srcX,
@ -583,7 +583,7 @@ IcBlt (pixman_bits_t *src,
int upsidedown);
pixman_private void
IcBlt24 (pixman_bits_t *srcLine,
fbBlt24 (pixman_bits_t *srcLine,
IcStride srcStride,
int srcX,
@ -601,7 +601,7 @@ IcBlt24 (pixman_bits_t *srcLine,
int upsidedown);
pixman_private void
IcBltStip (IcStip *src,
fbBltStip (IcStip *src,
IcStride srcStride, /* in IcStip units, not pixman_bits_t units */
int srcX,
@ -620,7 +620,7 @@ IcBltStip (IcStip *src,
* icbltone.c
*/
pixman_private void
IcBltOne (IcStip *src,
fbBltOne (IcStip *src,
IcStride srcStride,
int srcX,
pixman_bits_t *dst,
@ -638,7 +638,7 @@ IcBltOne (IcStip *src,
#ifdef FB_24BIT
pixman_private void
IcBltOne24 (IcStip *src,
fbBltOne24 (IcStip *src,
IcStride srcStride, /* IcStip units per scanline */
int srcX, /* bit position of source */
pixman_bits_t *dst,
@ -660,13 +660,13 @@ IcBltOne24 (IcStip *src,
*/
pixman_private void
IcTransparentSpan (pixman_bits_t *dst,
fbTransparentSpan (pixman_bits_t *dst,
pixman_bits_t stip,
pixman_bits_t fgxor,
int n);
pixman_private void
IcEvenStipple (pixman_bits_t *dst,
fbEvenStipple (pixman_bits_t *dst,
IcStride dstStride,
int dstX,
int dstBpp,
@ -687,7 +687,7 @@ IcEvenStipple (pixman_bits_t *dst,
int yRot);
pixman_private void
IcOddStipple (pixman_bits_t *dst,
fbOddStipple (pixman_bits_t *dst,
IcStride dstStride,
int dstX,
int dstBpp,
@ -709,7 +709,7 @@ IcOddStipple (pixman_bits_t *dst,
int yRot);
pixman_private void
IcStipple (pixman_bits_t *dst,
fbStipple (pixman_bits_t *dst,
IcStride dstStride,
int dstX,
int dstBpp,
@ -758,7 +758,7 @@ typedef uint32_t Pixel;
/* icutil.c */
pixman_private pixman_bits_t
IcReplicatePixel (Pixel p, int bpp);
fbReplicatePixel (Pixel p, int bpp);
/* fbtrap.c */

View file

@ -76,34 +76,34 @@ extern const IcMergeRopRec IcMergeRopBits[16] pixman_private;
/*
* Take a single bit (0 or 1) and generate a full mask
*/
#define IcFillFromBit(b,t) (~((t) ((b) & 1)-1))
#define fbFillFromBit(b,t) (~((t) ((b) & 1)-1))
#define IcXorT(rop,fg,pm,t) ((((fg) & IcFillFromBit((rop) >> 1,t)) | \
(~(fg) & IcFillFromBit((rop) >> 3,t))) & (pm))
#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \
(~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm))
#define IcAndT(rop,fg,pm,t) ((((fg) & IcFillFromBit (rop ^ (rop>>1),t)) | \
(~(fg) & IcFillFromBit((rop>>2) ^ (rop>>3),t))) | \
#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \
(~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \
~(pm))
#define IcXor(rop,fg,pm) IcXorT(rop,fg,pm,pixman_bits_t)
#define fbXor(rop,fg,pm) fbXorT(rop,fg,pm,pixman_bits_t)
#define IcAnd(rop,fg,pm) IcAndT(rop,fg,pm,pixman_bits_t)
#define fbAnd(rop,fg,pm) fbAndT(rop,fg,pm,pixman_bits_t)
#define IcXorStip(rop,fg,pm) IcXorT(rop,fg,pm,IcStip)
#define fbXorStip(rop,fg,pm) fbXorT(rop,fg,pm,IcStip)
#define IcAndStip(rop,fg,pm) IcAndT(rop,fg,pm,IcStip)
#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,IcStip)
/*
* Stippling operations;
*/
/* half of table */
extern const pixman_bits_t icStipple16Bits[256] pixman_private;
#define IcStipple16Bits(b) \
(icStipple16Bits[(b)&0xff] | icStipple16Bits[(b) >> 8] << FB_HALFUNIT)
extern const pixman_bits_t fbStipple16Bits[256] pixman_private;
#define FbStipple16Bits(b) \
(fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT)
pixman_private const pixman_bits_t *
IcStippleTable(int bits);
fbStippleTable(int bits);
#define IcStippleRRop(dst, b, fa, fx, ba, bx) \
(IcDoRRop(dst, fa, fx) & b) | (IcDoRRop(dst, ba, bx) & ~b)

View file

@ -55,7 +55,7 @@
*/
void
IcTransparentSpan (FbBits *dst,
fbTransparentSpan (FbBits *dst,
FbBits stip,
FbBits fgxor,
int n)

View file

@ -25,7 +25,7 @@
#include "pixman-xserver-compat.h"
pixman_bits_t
IcReplicatePixel (Pixel p, int bpp)
fbReplicatePixel (Pixel p, int bpp)
{
pixman_bits_t b = p;
@ -97,22 +97,22 @@ const IcMergeRopRec IcMergeRopBits[16] = {
SelMask(b,7,w))
#if FB_UNIT == 16
#define icStipple16Bits 0
#define icStipple8Bits 0
static const pixman_bits_t icStipple4Bits[16] = {
#define fbStipple16Bits 0
#define fbStipple8Bits 0
static const pixman_bits_t fbStipple4Bits[16] = {
C4( 0,4), C4( 1,4), C4( 2,4), C4( 3,4), C4( 4,4), C4( 5,4),
C4( 6,4), C4( 7,4), C4( 8,4), C4( 9,4), C4( 10,4), C4( 11,4),
C4( 12,4), C4( 13,4), C4( 14,4), C4( 15,4),};
static const pixman_bits_t icStipple2Bits[4] = {
static const pixman_bits_t fbStipple2Bits[4] = {
C2( 0,8), C2( 1,8), C2( 2,8), C2( 3,8),
};
static const pixman_bits_t icStipple1Bits[2] = {
static const pixman_bits_t fbStipple1Bits[2] = {
C1( 0,16), C1( 1,16),
};
#endif
#if FB_UNIT == 32
#define icStipple16Bits 0
static const pixman_bits_t icStipple8Bits[256] = {
#define fbStipple16Bits 0
static const pixman_bits_t fbStipple8Bits[256] = {
C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4),
C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4),
C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
@ -157,19 +157,19 @@ static const pixman_bits_t icStipple8Bits[256] = {
C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
C8(252,4), C8(253,4), C8(254,4), C8(255,4),
};
static const pixman_bits_t icStipple4Bits[16] = {
static const pixman_bits_t fbStipple4Bits[16] = {
C4( 0,8), C4( 1,8), C4( 2,8), C4( 3,8), C4( 4,8), C4( 5,8),
C4( 6,8), C4( 7,8), C4( 8,8), C4( 9,8), C4( 10,8), C4( 11,8),
C4( 12,8), C4( 13,8), C4( 14,8), C4( 15,8),};
static const pixman_bits_t icStipple2Bits[4] = {
static const pixman_bits_t fbStipple2Bits[4] = {
C2( 0,16), C2( 1,16), C2( 2,16), C2( 3,16),
};
static const pixman_bits_t icStipple1Bits[2] = {
static const pixman_bits_t fbStipple1Bits[2] = {
C1( 0,32), C1( 1,32),
};
#endif
#if FB_UNIT == 64
const pixman_bits_t icStipple16Bits[256] = {
const pixman_bits_t fbStipple16Bits[256] = {
C8( 0,4), C8( 1,4), C8( 2,4), C8( 3,4), C8( 4,4), C8( 5,4),
C8( 6,4), C8( 7,4), C8( 8,4), C8( 9,4), C8( 10,4), C8( 11,4),
C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
@ -214,7 +214,7 @@ const pixman_bits_t icStipple16Bits[256] = {
C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
C8(252,4), C8(253,4), C8(254,4), C8(255,4),
};
static const pixman_bits_t icStipple8Bits[256] = {
static const pixman_bits_t fbStipple8Bits[256] = {
C8( 0,8), C8( 1,8), C8( 2,8), C8( 3,8), C8( 4,8), C8( 5,8),
C8( 6,8), C8( 7,8), C8( 8,8), C8( 9,8), C8( 10,8), C8( 11,8),
C8( 12,8), C8( 13,8), C8( 14,8), C8( 15,8), C8( 16,8), C8( 17,8),
@ -259,28 +259,28 @@ static const pixman_bits_t icStipple8Bits[256] = {
C8(246,8), C8(247,8), C8(248,8), C8(249,8), C8(250,8), C8(251,8),
C8(252,8), C8(253,8), C8(254,8), C8(255,8),
};
static const pixman_bits_t icStipple4Bits[16] = {
static const pixman_bits_t fbStipple4Bits[16] = {
C4( 0,16), C4( 1,16), C4( 2,16), C4( 3,16), C4( 4,16), C4( 5,16),
C4( 6,16), C4( 7,16), C4( 8,16), C4( 9,16), C4( 10,16), C4( 11,16),
C4( 12,16), C4( 13,16), C4( 14,16), C4( 15,16),};
static const pixman_bits_t icStipple2Bits[4] = {
static const pixman_bits_t fbStipple2Bits[4] = {
C2( 0,32), C2( 1,32), C2( 2,32), C2( 3,32),
};
#define icStipple1Bits 0
#define fbStipple1Bits 0
#endif
const pixman_bits_t *
IcStippleTable(int bits)
fbStippleTable(int bits)
{
switch (bits) {
case 1:
return icStipple1Bits;
return fbStipple1Bits;
case 2:
return icStipple2Bits;
return fbStipple2Bits;
case 4:
return icStipple4Bits;
return fbStipple4Bits;
case 8:
return icStipple8Bits;
return fbStipple8Bits;
}
return 0;
}