xc/programs/Xserver/afb/afbbres.c

xc/programs/Xserver/afb/afbbresd.c
xc/programs/Xserver/afb/afbclip.c
xc/programs/Xserver/afb/afbhrzvert.c
xc/programs/Xserver/afb/afbline.c
xc/programs/Xserver/afb/afbmodule.c
xc/programs/Xserver/afb/afbpixmap.c
xc/programs/Xserver/afb/afbpolypnt.c
xc/programs/Xserver/afb/afbpushpxl.c
xc/programs/Xserver/afb/afbtegblt.c
xc/programs/Xserver/cfb/Imakefile.inc
xc/programs/Xserver/cfb/cfballpriv.c
xc/programs/Xserver/cfb/cfbbitblt.c
xc/programs/Xserver/cfb/cfbcppl.c
xc/programs/Xserver/cfb/cfbgc.c
xc/programs/Xserver/cfb/cfbglblt8.c
xc/programs/Xserver/cfb/cfbmap.h
xc/programs/Xserver/cfb/cfbpixmap.c
xc/programs/Xserver/cfb/cfbscrinit.c
xc/programs/Xserver/cfb/cfbtab.h
xc/programs/Xserver/cfb/cfbteblt8.c
xc/programs/Xserver/cfb/cfbunmap.h
xc/programs/Xserver/mfb/maskbits.c
xc/programs/Xserver/mfb/maskbits.h
xc/programs/Xserver/mfb/mergerop.h
xc/programs/Xserver/mfb/mfb.h
xc/programs/Xserver/mfb/mfbclip.c
xc/programs/Xserver/mfb/mfbfont.c
xc/programs/Xserver/mfb/mfbgc.c
xc/programs/Xserver/mfb/mfbmisc.c
xc/programs/Xserver/mfb/mfbpushpxl.c
//bugs.freedesktop.org/show_bug.cgi?id=1114) attachment #667
    (https://bugs.freedesktop.org/attachment.cgi?id=667): Convert afb and
    cfb{,16,24,32} to be dlloader-friendly. Patch by Adam Jackson
    <ajax@freedesktop.org>.
This commit is contained in:
Roland Mainz
2005-01-14 08:37:30 +00:00
parent 61b3c3aef5
commit 2137bc6eb9
30 changed files with 178 additions and 54 deletions

View File

@@ -79,8 +79,8 @@ unsigned char *rrops;
register int yinc; /* increment to next scanline, in bytes */
register PixelType *addrl; /* bitmask long pointer */
register PixelType bit; /* current bit being set/cleared/etc. */
PixelType leftbit = mask[0]; /* leftmost bit to process in new word */
PixelType rightbit = mask[PPW-1]; /* rightmost bit to process in new word */
PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */
PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */
register int e3 = e2-e1;
PixelType tmp;
@@ -103,7 +103,7 @@ unsigned char *rrops;
addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */
len = saveLen;
e = saveE;
bit = mask[x1 & PIM];
bit = mfbGetmask(x1 & PIM);
switch (rrops[d]) {
case RROP_BLACK:

View File

@@ -93,8 +93,8 @@ unsigned char *bgrrops;
register PixelType *addrl;
register int e3 = e2-e1;
register unsigned long bit;
PixelType leftbit = mask[0]; /* leftmost bit to process in new word */
PixelType rightbit = mask[PPW-1]; /* rightmost bit to process in new word */
PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */
PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */
int dashIndex;
int dashOffset;
int dashRemaining;
@@ -125,7 +125,7 @@ unsigned char *bgrrops;
e = saveE;
len = saveLen;
bit = mask[x1 & PIM];
bit = mfbGetmask(x1 & PIM);
rop = fgrop;
if (!isDoubleDash)

View File

@@ -102,7 +102,7 @@ afbPixmapToRegion(pPix)
register BoxPtr prectO, prectN;
BoxPtr FirstRect, rects, prectLineStart;
Bool fInBox, fSame;
register PixelType mask0 = mask[0];
register PixelType mask0 = mfbGetmask(0);
PixelType *pwLine;
int nWidth;

View File

@@ -186,17 +186,17 @@ unsigned char *rrops;
switch (rrops[d]) {
case RROP_BLACK:
bitmask = rmask[x1 & PIM];
bitmask = mfbGetrmask(x1 & PIM);
Duff(len, *addrl &= bitmask; afbScanlineInc(addrl, nlwidth) );
break;
case RROP_WHITE:
bitmask = mask[x1 & PIM];
bitmask = mfbGetmask(x1 & PIM);
Duff(len, *addrl |= bitmask; afbScanlineInc(addrl, nlwidth) );
break;
case RROP_INVERT:
bitmask = mask[x1 & PIM];
bitmask = mfbGetmask(x1 & PIM);
Duff(len, *addrl ^= bitmask; afbScanlineInc(addrl, nlwidth) );
break;

View File

@@ -401,13 +401,13 @@ afbLineSS(pDrawable, pGC, mode, npt, pptInit)
switch(rrops[d]) {
case RROP_BLACK:
*addrl &= rmask[x2 & PIM];
*addrl &= mfbGetrmask(x2 & PIM);
break;
case RROP_WHITE:
*addrl |= mask[x2 & PIM];
*addrl |= mfbGetmask(x2 & PIM);
break;
case RROP_INVERT:
*addrl ^= mask[x2 & PIM];
*addrl ^= mfbGetmask(x2 & PIM);
break;
case RROP_NOP:
break;
@@ -679,14 +679,14 @@ dontStep: ;
switch (rop) {
case RROP_BLACK:
*addrl &= rmask[x2 & PIM];
*addrl &= mfbGetrmask(x2 & PIM);
break;
case RROP_WHITE:
*addrl |= mask[x2 & PIM];
*addrl |= mfbGetmask(x2 & PIM);
break;
case RROP_INVERT:
*addrl ^= mask[x2 & PIM];
*addrl ^= mfbGetmask(x2 & PIM);
break;
case RROP_NOP:

View File

@@ -164,7 +164,7 @@ afbPadPixmap(pPixmap)
if (rep*width != PPW)
return;
mask = endtab[width];
mask = mfbGetendtab(width);
p = (PixelType *)(pPixmap->devPrivate.ptr);
@@ -206,7 +206,7 @@ afbXRotatePixmap(pPix, rw)
while(pw < pwFinal) {
t = *pw;
*pw++ = SCRRIGHT(t, rw) |
(SCRLEFT(t, (PPW-rw)) & endtab[rw]);
(SCRLEFT(t, (PPW-rw)) & mfbGetendtab(rw));
}
} else {
/* We no longer do this. Validate doesn't try to rotate odd-size

View File

@@ -113,7 +113,7 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit)
y = ppt->y + pDrawable->y;
if ((x >= pbox->x1) && (x < pbox->x2) &&
(y >= pbox->y1) && (y < pbox->y2))
*afbScanline(addrl, x, y, nlwidth) &= rmask[x & PIM];
*afbScanline(addrl, x, y, nlwidth) &= mfbGetrmask(x & PIM);
}
break;
@@ -123,7 +123,7 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit)
y = ppt->y + pDrawable->y;
if ((x >= pbox->x1) && (x < pbox->x2) &&
(y >= pbox->y1) && (y < pbox->y2))
*afbScanline(addrl, x, y, nlwidth) |= mask[x & PIM];
*afbScanline(addrl, x, y, nlwidth) |= mfbGetmask(x & PIM);
}
break;
@@ -133,7 +133,7 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit)
y = ppt->y + pDrawable->y;
if ((x >= pbox->x1) && (x < pbox->x2) &&
(y >= pbox->y1) && (y < pbox->y2))
*afbScanline(addrl, x, y, nlwidth) ^= mask[x & PIM];
*afbScanline(addrl, x, y, nlwidth) ^= mfbGetmask(x & PIM);
}
break;

View File

@@ -184,7 +184,7 @@ afbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
pwEnd = pwLineStart + dxDivPPW;
while(pw < pwEnd) {
w = *pw;
mask = endtab[1];
mask = mfbGetendtab(1);
for(ib = 0; ib < PPW; ib++) {
if(w & mask) {
if(!fInBox) {
@@ -214,7 +214,7 @@ afbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
if(ibEnd) {
/* Process final partial word on line */
w = *pw;
mask = endtab[1];
mask = mfbGetendtab(1);
for(ib = 0; ib < ibEnd; ib++) {
if(w & mask) {
if(!fInBox) {

View File

@@ -296,7 +296,7 @@ afbTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
widthGlyphs = widthGlyph * PGSZB;
#ifdef USE_LEFTBITS
glyphMask = endtab[widthGlyph];
glyphMask = mfbGetendtab(widthGlyph);
glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);
#endif