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:
parent
61b3c3aef5
commit
2137bc6eb9
|
@ -79,8 +79,8 @@ unsigned char *rrops;
|
||||||
register int yinc; /* increment to next scanline, in bytes */
|
register int yinc; /* increment to next scanline, in bytes */
|
||||||
register PixelType *addrl; /* bitmask long pointer */
|
register PixelType *addrl; /* bitmask long pointer */
|
||||||
register PixelType bit; /* current bit being set/cleared/etc. */
|
register PixelType bit; /* current bit being set/cleared/etc. */
|
||||||
PixelType leftbit = mask[0]; /* leftmost bit to process in new word */
|
PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */
|
||||||
PixelType rightbit = mask[PPW-1]; /* rightmost bit to process in new word */
|
PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */
|
||||||
|
|
||||||
register int e3 = e2-e1;
|
register int e3 = e2-e1;
|
||||||
PixelType tmp;
|
PixelType tmp;
|
||||||
|
@ -103,7 +103,7 @@ unsigned char *rrops;
|
||||||
addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */
|
addrlbase += sizeDst; /* @@@ NEXT PLANE @@@ */
|
||||||
len = saveLen;
|
len = saveLen;
|
||||||
e = saveE;
|
e = saveE;
|
||||||
bit = mask[x1 & PIM];
|
bit = mfbGetmask(x1 & PIM);
|
||||||
|
|
||||||
switch (rrops[d]) {
|
switch (rrops[d]) {
|
||||||
case RROP_BLACK:
|
case RROP_BLACK:
|
||||||
|
|
|
@ -93,8 +93,8 @@ unsigned char *bgrrops;
|
||||||
register PixelType *addrl;
|
register PixelType *addrl;
|
||||||
register int e3 = e2-e1;
|
register int e3 = e2-e1;
|
||||||
register unsigned long bit;
|
register unsigned long bit;
|
||||||
PixelType leftbit = mask[0]; /* leftmost bit to process in new word */
|
PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */
|
||||||
PixelType rightbit = mask[PPW-1]; /* rightmost bit to process in new word */
|
PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */
|
||||||
int dashIndex;
|
int dashIndex;
|
||||||
int dashOffset;
|
int dashOffset;
|
||||||
int dashRemaining;
|
int dashRemaining;
|
||||||
|
@ -125,7 +125,7 @@ unsigned char *bgrrops;
|
||||||
|
|
||||||
e = saveE;
|
e = saveE;
|
||||||
len = saveLen;
|
len = saveLen;
|
||||||
bit = mask[x1 & PIM];
|
bit = mfbGetmask(x1 & PIM);
|
||||||
|
|
||||||
rop = fgrop;
|
rop = fgrop;
|
||||||
if (!isDoubleDash)
|
if (!isDoubleDash)
|
||||||
|
|
|
@ -102,7 +102,7 @@ afbPixmapToRegion(pPix)
|
||||||
register BoxPtr prectO, prectN;
|
register BoxPtr prectO, prectN;
|
||||||
BoxPtr FirstRect, rects, prectLineStart;
|
BoxPtr FirstRect, rects, prectLineStart;
|
||||||
Bool fInBox, fSame;
|
Bool fInBox, fSame;
|
||||||
register PixelType mask0 = mask[0];
|
register PixelType mask0 = mfbGetmask(0);
|
||||||
PixelType *pwLine;
|
PixelType *pwLine;
|
||||||
int nWidth;
|
int nWidth;
|
||||||
|
|
||||||
|
|
|
@ -186,17 +186,17 @@ unsigned char *rrops;
|
||||||
|
|
||||||
switch (rrops[d]) {
|
switch (rrops[d]) {
|
||||||
case RROP_BLACK:
|
case RROP_BLACK:
|
||||||
bitmask = rmask[x1 & PIM];
|
bitmask = mfbGetrmask(x1 & PIM);
|
||||||
Duff(len, *addrl &= bitmask; afbScanlineInc(addrl, nlwidth) );
|
Duff(len, *addrl &= bitmask; afbScanlineInc(addrl, nlwidth) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RROP_WHITE:
|
case RROP_WHITE:
|
||||||
bitmask = mask[x1 & PIM];
|
bitmask = mfbGetmask(x1 & PIM);
|
||||||
Duff(len, *addrl |= bitmask; afbScanlineInc(addrl, nlwidth) );
|
Duff(len, *addrl |= bitmask; afbScanlineInc(addrl, nlwidth) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RROP_INVERT:
|
case RROP_INVERT:
|
||||||
bitmask = mask[x1 & PIM];
|
bitmask = mfbGetmask(x1 & PIM);
|
||||||
Duff(len, *addrl ^= bitmask; afbScanlineInc(addrl, nlwidth) );
|
Duff(len, *addrl ^= bitmask; afbScanlineInc(addrl, nlwidth) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -401,13 +401,13 @@ afbLineSS(pDrawable, pGC, mode, npt, pptInit)
|
||||||
|
|
||||||
switch(rrops[d]) {
|
switch(rrops[d]) {
|
||||||
case RROP_BLACK:
|
case RROP_BLACK:
|
||||||
*addrl &= rmask[x2 & PIM];
|
*addrl &= mfbGetrmask(x2 & PIM);
|
||||||
break;
|
break;
|
||||||
case RROP_WHITE:
|
case RROP_WHITE:
|
||||||
*addrl |= mask[x2 & PIM];
|
*addrl |= mfbGetmask(x2 & PIM);
|
||||||
break;
|
break;
|
||||||
case RROP_INVERT:
|
case RROP_INVERT:
|
||||||
*addrl ^= mask[x2 & PIM];
|
*addrl ^= mfbGetmask(x2 & PIM);
|
||||||
break;
|
break;
|
||||||
case RROP_NOP:
|
case RROP_NOP:
|
||||||
break;
|
break;
|
||||||
|
@ -679,14 +679,14 @@ dontStep: ;
|
||||||
|
|
||||||
switch (rop) {
|
switch (rop) {
|
||||||
case RROP_BLACK:
|
case RROP_BLACK:
|
||||||
*addrl &= rmask[x2 & PIM];
|
*addrl &= mfbGetrmask(x2 & PIM);
|
||||||
break;
|
break;
|
||||||
case RROP_WHITE:
|
case RROP_WHITE:
|
||||||
*addrl |= mask[x2 & PIM];
|
*addrl |= mfbGetmask(x2 & PIM);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RROP_INVERT:
|
case RROP_INVERT:
|
||||||
*addrl ^= mask[x2 & PIM];
|
*addrl ^= mfbGetmask(x2 & PIM);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RROP_NOP:
|
case RROP_NOP:
|
||||||
|
|
|
@ -164,7 +164,7 @@ afbPadPixmap(pPixmap)
|
||||||
if (rep*width != PPW)
|
if (rep*width != PPW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mask = endtab[width];
|
mask = mfbGetendtab(width);
|
||||||
|
|
||||||
p = (PixelType *)(pPixmap->devPrivate.ptr);
|
p = (PixelType *)(pPixmap->devPrivate.ptr);
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ afbXRotatePixmap(pPix, rw)
|
||||||
while(pw < pwFinal) {
|
while(pw < pwFinal) {
|
||||||
t = *pw;
|
t = *pw;
|
||||||
*pw++ = SCRRIGHT(t, rw) |
|
*pw++ = SCRRIGHT(t, rw) |
|
||||||
(SCRLEFT(t, (PPW-rw)) & endtab[rw]);
|
(SCRLEFT(t, (PPW-rw)) & mfbGetendtab(rw));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* We no longer do this. Validate doesn't try to rotate odd-size
|
/* We no longer do this. Validate doesn't try to rotate odd-size
|
||||||
|
|
|
@ -113,7 +113,7 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit)
|
||||||
y = ppt->y + pDrawable->y;
|
y = ppt->y + pDrawable->y;
|
||||||
if ((x >= pbox->x1) && (x < pbox->x2) &&
|
if ((x >= pbox->x1) && (x < pbox->x2) &&
|
||||||
(y >= pbox->y1) && (y < pbox->y2))
|
(y >= pbox->y1) && (y < pbox->y2))
|
||||||
*afbScanline(addrl, x, y, nlwidth) &= rmask[x & PIM];
|
*afbScanline(addrl, x, y, nlwidth) &= mfbGetrmask(x & PIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit)
|
||||||
y = ppt->y + pDrawable->y;
|
y = ppt->y + pDrawable->y;
|
||||||
if ((x >= pbox->x1) && (x < pbox->x2) &&
|
if ((x >= pbox->x1) && (x < pbox->x2) &&
|
||||||
(y >= pbox->y1) && (y < pbox->y2))
|
(y >= pbox->y1) && (y < pbox->y2))
|
||||||
*afbScanline(addrl, x, y, nlwidth) |= mask[x & PIM];
|
*afbScanline(addrl, x, y, nlwidth) |= mfbGetmask(x & PIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit)
|
||||||
y = ppt->y + pDrawable->y;
|
y = ppt->y + pDrawable->y;
|
||||||
if ((x >= pbox->x1) && (x < pbox->x2) &&
|
if ((x >= pbox->x1) && (x < pbox->x2) &&
|
||||||
(y >= pbox->y1) && (y < pbox->y2))
|
(y >= pbox->y1) && (y < pbox->y2))
|
||||||
*afbScanline(addrl, x, y, nlwidth) ^= mask[x & PIM];
|
*afbScanline(addrl, x, y, nlwidth) ^= mfbGetmask(x & PIM);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ afbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
|
||||||
pwEnd = pwLineStart + dxDivPPW;
|
pwEnd = pwLineStart + dxDivPPW;
|
||||||
while(pw < pwEnd) {
|
while(pw < pwEnd) {
|
||||||
w = *pw;
|
w = *pw;
|
||||||
mask = endtab[1];
|
mask = mfbGetendtab(1);
|
||||||
for(ib = 0; ib < PPW; ib++) {
|
for(ib = 0; ib < PPW; ib++) {
|
||||||
if(w & mask) {
|
if(w & mask) {
|
||||||
if(!fInBox) {
|
if(!fInBox) {
|
||||||
|
@ -214,7 +214,7 @@ afbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
|
||||||
if(ibEnd) {
|
if(ibEnd) {
|
||||||
/* Process final partial word on line */
|
/* Process final partial word on line */
|
||||||
w = *pw;
|
w = *pw;
|
||||||
mask = endtab[1];
|
mask = mfbGetendtab(1);
|
||||||
for(ib = 0; ib < ibEnd; ib++) {
|
for(ib = 0; ib < ibEnd; ib++) {
|
||||||
if(w & mask) {
|
if(w & mask) {
|
||||||
if(!fInBox) {
|
if(!fInBox) {
|
||||||
|
|
|
@ -296,7 +296,7 @@ afbTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
|
||||||
widthGlyphs = widthGlyph * PGSZB;
|
widthGlyphs = widthGlyph * PGSZB;
|
||||||
|
|
||||||
#ifdef USE_LEFTBITS
|
#ifdef USE_LEFTBITS
|
||||||
glyphMask = endtab[widthGlyph];
|
glyphMask = mfbGetendtab(widthGlyph);
|
||||||
glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);
|
glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "cfbmskbits.h"
|
#include "cfbmskbits.h"
|
||||||
#include "mibstore.h"
|
#include "mibstore.h"
|
||||||
|
|
||||||
#if PSZ==8
|
#if 1 || PSZ==8
|
||||||
int cfbWindowPrivateIndex;
|
int cfbWindowPrivateIndex;
|
||||||
int cfbGCPrivateIndex;
|
int cfbGCPrivateIndex;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -973,15 +973,15 @@ cfbCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask)
|
||||||
#else /* PSZ == 8 */
|
#else /* PSZ == 8 */
|
||||||
|
|
||||||
#define mfbmaskbits(x, w, startmask, endmask, nlw) \
|
#define mfbmaskbits(x, w, startmask, endmask, nlw) \
|
||||||
startmask = starttab[(x)&0x1f]; \
|
startmask = mfbGetstarttab((x)&0x1f); \
|
||||||
endmask = endtab[((x)+(w)) & 0x1f]; \
|
endmask = mfbGetendtab(((x)+(w)) & 0x1f); \
|
||||||
if (startmask) \
|
if (startmask) \
|
||||||
nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \
|
nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \
|
||||||
else \
|
else \
|
||||||
nlw = (w) >> 5;
|
nlw = (w) >> 5;
|
||||||
|
|
||||||
#define mfbmaskpartialbits(x, w, mask) \
|
#define mfbmaskpartialbits(x, w, mask) \
|
||||||
mask = partmasks[(x)&0x1f][(w)&0x1f];
|
mask = mfbGetpartmasks((x)&0x1f,(w)&0x1f);
|
||||||
|
|
||||||
#define LeftMost 0
|
#define LeftMost 0
|
||||||
#define StepBit(bit, inc) ((bit) += (inc))
|
#define StepBit(bit, inc) ((bit) += (inc))
|
||||||
|
@ -1389,7 +1389,7 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
|
||||||
|
|
||||||
oldalu = pGC->alu;
|
oldalu = pGC->alu;
|
||||||
if ((pGC->fgPixel & 1) == 0 && (pGC->bgPixel&1) == 1)
|
if ((pGC->fgPixel & 1) == 0 && (pGC->bgPixel&1) == 1)
|
||||||
pGC->alu = InverseAlu[pGC->alu];
|
pGC->alu = mfbGetInverseAlu(pGC->alu);
|
||||||
else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1))
|
else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1))
|
||||||
pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel);
|
pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel);
|
||||||
ret = cfbCopyPlaneReduce(pSrcDrawable, pDstDrawable,
|
ret = cfbCopyPlaneReduce(pSrcDrawable, pDstDrawable,
|
||||||
|
|
|
@ -245,15 +245,15 @@ cfbCopyPlane8to1(
|
||||||
#else /* PSZ == 8 */
|
#else /* PSZ == 8 */
|
||||||
|
|
||||||
#define mfbmaskbits(x, w, startmask, endmask, nlw) \
|
#define mfbmaskbits(x, w, startmask, endmask, nlw) \
|
||||||
startmask = starttab[(x)&0x1f]; \
|
startmask = mfbGetstarttab((x)&0x1f); \
|
||||||
endmask = endtab[((x)+(w)) & 0x1f]; \
|
endmask = mfbGetendtab(((x)+(w)) & 0x1f); \
|
||||||
if (startmask) \
|
if (startmask) \
|
||||||
nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \
|
nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \
|
||||||
else \
|
else \
|
||||||
nlw = (w) >> 5;
|
nlw = (w) >> 5;
|
||||||
|
|
||||||
#define mfbmaskpartialbits(x, w, mask) \
|
#define mfbmaskpartialbits(x, w, mask) \
|
||||||
mask = partmasks[(x)&0x1f][(w)&0x1f];
|
mask = mfbGetpartmasks((x)&0x1f,(w)&0x1f);
|
||||||
|
|
||||||
#define LeftMost 0
|
#define LeftMost 0
|
||||||
#define StepBit(bit, inc) ((bit) += (inc))
|
#define StepBit(bit, inc) ((bit) += (inc))
|
||||||
|
|
28
cfb/cfbgc.c
28
cfb/cfbgc.c
|
@ -85,11 +85,13 @@ SOFTWARE.
|
||||||
# define usePolyGlyphBlt miPolyGlyphBlt
|
# define usePolyGlyphBlt miPolyGlyphBlt
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void cfbUnPushPixels (GCPtr, PixmapPtr, DrawablePtr, int, int, int, int);
|
||||||
|
|
||||||
#ifdef FOUR_BIT_CODE
|
#ifdef FOUR_BIT_CODE
|
||||||
# define usePushPixels cfbPushPixels8
|
# define usePushPixels cfbPushPixels8
|
||||||
#else
|
#else
|
||||||
#ifndef LOWMEMFTPT
|
#ifndef LOWMEMFTPT
|
||||||
# define usePushPixels mfbPushPixels
|
# define usePushPixels cfbUnPushPixels
|
||||||
#else
|
#else
|
||||||
# define usePushPixels miPushPixels
|
# define usePushPixels miPushPixels
|
||||||
#endif /* ifndef LOWMEMFTPT */
|
#endif /* ifndef LOWMEMFTPT */
|
||||||
|
@ -284,6 +286,14 @@ cfbCreateGC(pGC)
|
||||||
pGC->clientClip = NULL;
|
pGC->clientClip = NULL;
|
||||||
pGC->clientClipType = CT_NONE;
|
pGC->clientClipType = CT_NONE;
|
||||||
|
|
||||||
|
if (cfbNonTEOps.PushPixels == cfbUnPushPixels)
|
||||||
|
{
|
||||||
|
cfbTEOps1Rect.PushPixels = mfbPushPixelsWeak();
|
||||||
|
cfbNonTEOps1Rect.PushPixels = mfbPushPixelsWeak();
|
||||||
|
cfbTEOps.PushPixels = mfbPushPixelsWeak();
|
||||||
|
cfbNonTEOps.PushPixels = mfbPushPixelsWeak();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* some of the output primitives aren't really necessary, since they
|
* some of the output primitives aren't really necessary, since they
|
||||||
* will be filled in ValidateGC because of dix/CreateGC() setting all
|
* will be filled in ValidateGC because of dix/CreateGC() setting all
|
||||||
|
@ -767,7 +777,7 @@ cfbValidateGC(pGC, changes, pDrawable)
|
||||||
#endif
|
#endif
|
||||||
#ifdef FOUR_BIT_CODE
|
#ifdef FOUR_BIT_CODE
|
||||||
#ifndef LOWMEMFTPT
|
#ifndef LOWMEMFTPT
|
||||||
pGC->ops->PushPixels = mfbPushPixels;
|
pGC->ops->PushPixels = mfbPushPixelsWeak();
|
||||||
#else
|
#else
|
||||||
pGC->ops->PushPixels = miPushPixels;
|
pGC->ops->PushPixels = miPushPixels;
|
||||||
#endif /* ifndef LOWMEMFTPT */
|
#endif /* ifndef LOWMEMFTPT */
|
||||||
|
@ -789,3 +799,17 @@ cfbValidateGC(pGC, changes, pDrawable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* this is never called, it just exists to have its address
|
||||||
|
* taken in mfbCreateGC.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
cfbUnPushPixels (pGC, pBitmap, pDrawable, dx, dy, xOrg, yOrg)
|
||||||
|
GCPtr pGC;
|
||||||
|
PixmapPtr pBitmap;
|
||||||
|
DrawablePtr pDrawable;
|
||||||
|
int dx, dy, xOrg, yOrg;
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@ in this Software without prior written authorization from The Open Group.
|
||||||
|
|
||||||
#ifdef USE_LEFTBITS
|
#ifdef USE_LEFTBITS
|
||||||
typedef unsigned char *glyphPointer;
|
typedef unsigned char *glyphPointer;
|
||||||
extern CfbBits endtab[];
|
|
||||||
|
|
||||||
#define GlyphBits(bits,width,dst) getleftbits(bits,width,dst); \
|
#define GlyphBits(bits,width,dst) getleftbits(bits,width,dst); \
|
||||||
(dst) &= widthMask; \
|
(dst) &= widthMask; \
|
||||||
|
@ -251,7 +250,7 @@ cfbPolyGlyphBlt8 (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
|
||||||
#ifdef USE_LEFTBITS
|
#ifdef USE_LEFTBITS
|
||||||
w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
|
w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
|
||||||
widthGlyph = PADGLYPHWIDTHBYTES(w);
|
widthGlyph = PADGLYPHWIDTHBYTES(w);
|
||||||
widthMask = endtab[w];
|
widthMask = mfbGetendtab(w);
|
||||||
#endif
|
#endif
|
||||||
do {
|
do {
|
||||||
dst = dstLine;
|
dst = dstLine;
|
||||||
|
@ -380,7 +379,7 @@ cfbPolyGlyphBlt8Clipped(
|
||||||
#ifdef USE_LEFTBITS
|
#ifdef USE_LEFTBITS
|
||||||
w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
|
w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
|
||||||
widthGlyph = PADGLYPHWIDTHBYTES(w);
|
widthGlyph = PADGLYPHWIDTHBYTES(w);
|
||||||
widthMask = endtab[w];
|
widthMask = mfbGetendtab(w);
|
||||||
#endif
|
#endif
|
||||||
switch (cfb8ComputeClipMasks32 (pBox, numRects, xG, yG, w, hTmp, clips))
|
switch (cfb8ComputeClipMasks32 (pBox, numRects, xG, yG, w, hTmp, clips))
|
||||||
{
|
{
|
||||||
|
|
14
cfb/cfbmap.h
14
cfb/cfbmap.h
|
@ -94,13 +94,17 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#undef cfbFillSpanTileOddGeneral
|
#undef cfbFillSpanTileOddGeneral
|
||||||
#undef cfbFinishScreenInit
|
#undef cfbFinishScreenInit
|
||||||
#undef cfbGCFuncs
|
#undef cfbGCFuncs
|
||||||
|
#undef cfbGCPrivateIndex
|
||||||
#undef cfbGetImage
|
#undef cfbGetImage
|
||||||
#undef cfbGetScreenPixmap
|
#undef cfbGetScreenPixmap
|
||||||
#undef cfbGetSpans
|
#undef cfbGetSpans
|
||||||
#undef cfbHorzS
|
#undef cfbHorzS
|
||||||
#undef cfbImageGlyphBlt8
|
#undef cfbImageGlyphBlt8
|
||||||
|
#undef cfbInitializeColormap
|
||||||
|
#undef cfbInstallColormap
|
||||||
#undef cfbLineSD
|
#undef cfbLineSD
|
||||||
#undef cfbLineSS
|
#undef cfbLineSS
|
||||||
|
#undef cfbListInstalledColormaps
|
||||||
#undef cfbMapWindow
|
#undef cfbMapWindow
|
||||||
#undef cfbMatchCommon
|
#undef cfbMatchCommon
|
||||||
#undef cfbNonTEOps
|
#undef cfbNonTEOps
|
||||||
|
@ -116,6 +120,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#undef cfbPositionWindow
|
#undef cfbPositionWindow
|
||||||
#undef cfbPutImage
|
#undef cfbPutImage
|
||||||
#undef cfbReduceRasterOp
|
#undef cfbReduceRasterOp
|
||||||
|
#undef cfbResolveColor
|
||||||
#undef cfbRestoreAreas
|
#undef cfbRestoreAreas
|
||||||
#undef cfbSaveAreas
|
#undef cfbSaveAreas
|
||||||
#undef cfbScreenInit
|
#undef cfbScreenInit
|
||||||
|
@ -136,11 +141,13 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#undef cfbTEOps1Rect
|
#undef cfbTEOps1Rect
|
||||||
#undef cfbTile32FSCopy
|
#undef cfbTile32FSCopy
|
||||||
#undef cfbTile32FSGeneral
|
#undef cfbTile32FSGeneral
|
||||||
|
#undef cfbUninstallColormap
|
||||||
#undef cfbUnmapWindow
|
#undef cfbUnmapWindow
|
||||||
#undef cfbUnnaturalStippleFS
|
#undef cfbUnnaturalStippleFS
|
||||||
#undef cfbUnnaturalTileFS
|
#undef cfbUnnaturalTileFS
|
||||||
#undef cfbValidateGC
|
#undef cfbValidateGC
|
||||||
#undef cfbVertS
|
#undef cfbVertS
|
||||||
|
#undef cfbWindowPrivateIndex
|
||||||
#undef cfbXRotatePixmap
|
#undef cfbXRotatePixmap
|
||||||
#undef cfbYRotatePixmap
|
#undef cfbYRotatePixmap
|
||||||
#undef cfbZeroPolyArcSS8Copy
|
#undef cfbZeroPolyArcSS8Copy
|
||||||
|
@ -263,13 +270,17 @@ cfb can not hack PSZ yet
|
||||||
#define cfbFillSpanTileOddGeneral CFBNAME(FillSpanTileOddGeneral)
|
#define cfbFillSpanTileOddGeneral CFBNAME(FillSpanTileOddGeneral)
|
||||||
#define cfbFinishScreenInit CFBNAME(FinishScreenInit)
|
#define cfbFinishScreenInit CFBNAME(FinishScreenInit)
|
||||||
#define cfbGCFuncs CFBNAME(GCFuncs)
|
#define cfbGCFuncs CFBNAME(GCFuncs)
|
||||||
|
#define cfbGCPrivateIndex CFBNAME(GCPrivateIndex)
|
||||||
#define cfbGetImage CFBNAME(GetImage)
|
#define cfbGetImage CFBNAME(GetImage)
|
||||||
#define cfbGetScreenPixmap CFBNAME(GetScreenPixmap)
|
#define cfbGetScreenPixmap CFBNAME(GetScreenPixmap)
|
||||||
#define cfbGetSpans CFBNAME(GetSpans)
|
#define cfbGetSpans CFBNAME(GetSpans)
|
||||||
#define cfbHorzS CFBNAME(HorzS)
|
#define cfbHorzS CFBNAME(HorzS)
|
||||||
#define cfbImageGlyphBlt8 CFBNAME(ImageGlyphBlt8)
|
#define cfbImageGlyphBlt8 CFBNAME(ImageGlyphBlt8)
|
||||||
|
#define cfbInitializeColormap CFBNAME(InitializeColormap)
|
||||||
|
#define cfbInstallColormap CFBNAME(InstallColormap)
|
||||||
#define cfbLineSD CFBNAME(LineSD)
|
#define cfbLineSD CFBNAME(LineSD)
|
||||||
#define cfbLineSS CFBNAME(LineSS)
|
#define cfbLineSS CFBNAME(LineSS)
|
||||||
|
#define cfbListInstalledColormaps CFBNAME(ListInstalledColormaps)
|
||||||
#define cfbMapWindow CFBNAME(MapWindow)
|
#define cfbMapWindow CFBNAME(MapWindow)
|
||||||
#define cfbMatchCommon CFBNAME(MatchCommon)
|
#define cfbMatchCommon CFBNAME(MatchCommon)
|
||||||
#define cfbNonTEOps CFBNAME(NonTEOps)
|
#define cfbNonTEOps CFBNAME(NonTEOps)
|
||||||
|
@ -285,6 +296,7 @@ cfb can not hack PSZ yet
|
||||||
#define cfbPositionWindow CFBNAME(PositionWindow)
|
#define cfbPositionWindow CFBNAME(PositionWindow)
|
||||||
#define cfbPutImage CFBNAME(PutImage)
|
#define cfbPutImage CFBNAME(PutImage)
|
||||||
#define cfbReduceRasterOp CFBNAME(ReduceRasterOp)
|
#define cfbReduceRasterOp CFBNAME(ReduceRasterOp)
|
||||||
|
#define cfbResolveColor CFBNAME(ResolveColor)
|
||||||
#define cfbRestoreAreas CFBNAME(RestoreAreas)
|
#define cfbRestoreAreas CFBNAME(RestoreAreas)
|
||||||
#define cfbSaveAreas CFBNAME(SaveAreas)
|
#define cfbSaveAreas CFBNAME(SaveAreas)
|
||||||
#define cfbScreenInit CFBNAME(ScreenInit)
|
#define cfbScreenInit CFBNAME(ScreenInit)
|
||||||
|
@ -305,11 +317,13 @@ cfb can not hack PSZ yet
|
||||||
#define cfbTEOps1Rect CFBNAME(TEOps1Rect)
|
#define cfbTEOps1Rect CFBNAME(TEOps1Rect)
|
||||||
#define cfbTile32FSCopy CFBNAME(Tile32FSCopy)
|
#define cfbTile32FSCopy CFBNAME(Tile32FSCopy)
|
||||||
#define cfbTile32FSGeneral CFBNAME(Tile32FSGeneral)
|
#define cfbTile32FSGeneral CFBNAME(Tile32FSGeneral)
|
||||||
|
#define cfbUninstallColormap CFBNAME(UninstallColormap)
|
||||||
#define cfbUnmapWindow CFBNAME(UnmapWindow)
|
#define cfbUnmapWindow CFBNAME(UnmapWindow)
|
||||||
#define cfbUnnaturalStippleFS CFBNAME(UnnaturalStippleFS)
|
#define cfbUnnaturalStippleFS CFBNAME(UnnaturalStippleFS)
|
||||||
#define cfbUnnaturalTileFS CFBNAME(UnnaturalTileFS)
|
#define cfbUnnaturalTileFS CFBNAME(UnnaturalTileFS)
|
||||||
#define cfbValidateGC CFBNAME(ValidateGC)
|
#define cfbValidateGC CFBNAME(ValidateGC)
|
||||||
#define cfbVertS CFBNAME(VertS)
|
#define cfbVertS CFBNAME(VertS)
|
||||||
|
#define cfbWindowPrivateIndex CFBNAME(WindowPrivateIndex)
|
||||||
#define cfbXRotatePixmap CFBNAME(XRotatePixmap)
|
#define cfbXRotatePixmap CFBNAME(XRotatePixmap)
|
||||||
#define cfbYRotatePixmap CFBNAME(YRotatePixmap)
|
#define cfbYRotatePixmap CFBNAME(YRotatePixmap)
|
||||||
#define cfbZeroPolyArcSS8Copy CFBNAME(ZeroPolyArcSSCopy)
|
#define cfbZeroPolyArcSS8Copy CFBNAME(ZeroPolyArcSSCopy)
|
||||||
|
|
|
@ -60,8 +60,6 @@ SOFTWARE.
|
||||||
#include "cfb.h"
|
#include "cfb.h"
|
||||||
#include "cfbmskbits.h"
|
#include "cfbmskbits.h"
|
||||||
|
|
||||||
extern CfbBits endtab[];
|
|
||||||
|
|
||||||
PixmapPtr
|
PixmapPtr
|
||||||
cfbCreatePixmap (pScreen, width, height, depth)
|
cfbCreatePixmap (pScreen, width, height, depth)
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
@ -160,7 +158,7 @@ cfbPadPixmap(pPixmap)
|
||||||
if (rep*width != PGSZ)
|
if (rep*width != PGSZ)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mask = endtab[width];
|
mask = mfbGetendtab(width);
|
||||||
|
|
||||||
p = (CfbBits *)(pPixmap->devPrivate.ptr);
|
p = (CfbBits *)(pPixmap->devPrivate.ptr);
|
||||||
for (h=0; h < pPixmap->drawable.height; h++)
|
for (h=0; h < pPixmap->drawable.height; h++)
|
||||||
|
|
|
@ -99,7 +99,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
pScreen->defColormap = FakeClientID(0);
|
pScreen->defColormap = FakeClientID(0);
|
||||||
/* let CreateDefColormap do whatever it wants for pixels */
|
/* let CreateDefColormap do whatever it wants for pixels */
|
||||||
pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0;
|
pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0;
|
||||||
pScreen->QueryBestSize = mfbQueryBestSize;
|
pScreen->QueryBestSize = mfbQueryBestSizeWeak();
|
||||||
/* SaveScreen */
|
/* SaveScreen */
|
||||||
pScreen->GetImage = cfbGetImage;
|
pScreen->GetImage = cfbGetImage;
|
||||||
pScreen->GetSpans = cfbGetSpans;
|
pScreen->GetSpans = cfbGetSpans;
|
||||||
|
@ -114,8 +114,8 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
pScreen->CopyWindow = cfbCopyWindow;
|
pScreen->CopyWindow = cfbCopyWindow;
|
||||||
pScreen->CreatePixmap = cfbCreatePixmap;
|
pScreen->CreatePixmap = cfbCreatePixmap;
|
||||||
pScreen->DestroyPixmap = cfbDestroyPixmap;
|
pScreen->DestroyPixmap = cfbDestroyPixmap;
|
||||||
pScreen->RealizeFont = mfbRealizeFont;
|
pScreen->RealizeFont = mfbRealizeFontWeak();
|
||||||
pScreen->UnrealizeFont = mfbUnrealizeFont;
|
pScreen->UnrealizeFont = mfbUnrealizeFontWeak();
|
||||||
pScreen->CreateGC = cfbCreateGC;
|
pScreen->CreateGC = cfbCreateGC;
|
||||||
pScreen->CreateColormap = cfbInitializeColormap;
|
pScreen->CreateColormap = cfbInitializeColormap;
|
||||||
pScreen->DestroyColormap = DestroyColormapNoop;
|
pScreen->DestroyColormap = DestroyColormapNoop;
|
||||||
|
@ -124,7 +124,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
|
||||||
pScreen->ListInstalledColormaps = cfbListInstalledColormaps;
|
pScreen->ListInstalledColormaps = cfbListInstalledColormaps;
|
||||||
pScreen->StoreColors = StoreColorsNoop;
|
pScreen->StoreColors = StoreColorsNoop;
|
||||||
pScreen->ResolveColor = cfbResolveColor;
|
pScreen->ResolveColor = cfbResolveColor;
|
||||||
pScreen->BitmapToRegion = mfbPixmapToRegion;
|
pScreen->BitmapToRegion = mfbPixmapToRegionWeak();
|
||||||
|
|
||||||
mfbRegisterCopyPlaneProc (pScreen, cfbCopyPlane);
|
mfbRegisterCopyPlaneProc (pScreen, cfbCopyPlane);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
#define _CFBTAB_H_
|
#define _CFBTAB_H_
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
|
#if 0
|
||||||
extern int starttab[32], endtab[32];
|
extern int starttab[32], endtab[32];
|
||||||
extern unsigned int partmasks[32][32];
|
extern unsigned int partmasks[32][32];
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _CFBTAB_H_ */
|
#endif /* _CFBTAB_H_ */
|
||||||
|
|
|
@ -160,7 +160,6 @@ typedef unsigned int *glyphPointer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LEFTBITS
|
#ifdef USE_LEFTBITS
|
||||||
extern CfbBits endtab[];
|
|
||||||
|
|
||||||
#define IncChar(c) (c = (glyphPointer) (((char *) c) + glyphBytes))
|
#define IncChar(c) (c = (glyphPointer) (((char *) c) + glyphBytes))
|
||||||
|
|
||||||
|
@ -408,7 +407,7 @@ CFBTEGBLT8 (pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LEFTBITS
|
#ifdef USE_LEFTBITS
|
||||||
glyphMask = endtab[widthGlyph];
|
glyphMask = mfbGetendtab(widthGlyph);
|
||||||
glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);
|
glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -93,13 +93,17 @@
|
||||||
#undef cfbFillSpanTileOddGeneral
|
#undef cfbFillSpanTileOddGeneral
|
||||||
#undef cfbFinishScreenInit
|
#undef cfbFinishScreenInit
|
||||||
#undef cfbGCFuncs
|
#undef cfbGCFuncs
|
||||||
|
#undef cfbGCPrivateIndex
|
||||||
#undef cfbGetImage
|
#undef cfbGetImage
|
||||||
#undef cfbGetScreenPixmap
|
#undef cfbGetScreenPixmap
|
||||||
#undef cfbGetSpans
|
#undef cfbGetSpans
|
||||||
#undef cfbHorzS
|
#undef cfbHorzS
|
||||||
#undef cfbImageGlyphBlt8
|
#undef cfbImageGlyphBlt8
|
||||||
|
#undef cfbInitializeColormap
|
||||||
|
#undef cfbInstallColormap
|
||||||
#undef cfbLineSD
|
#undef cfbLineSD
|
||||||
#undef cfbLineSS
|
#undef cfbLineSS
|
||||||
|
#undef cfbListInstalledColormaps
|
||||||
#undef cfbMapWindow
|
#undef cfbMapWindow
|
||||||
#undef cfbMatchCommon
|
#undef cfbMatchCommon
|
||||||
#undef cfbNonTEOps
|
#undef cfbNonTEOps
|
||||||
|
@ -115,6 +119,7 @@
|
||||||
#undef cfbPositionWindow
|
#undef cfbPositionWindow
|
||||||
#undef cfbPutImage
|
#undef cfbPutImage
|
||||||
#undef cfbReduceRasterOp
|
#undef cfbReduceRasterOp
|
||||||
|
#undef cfbResolveColor
|
||||||
#undef cfbRestoreAreas
|
#undef cfbRestoreAreas
|
||||||
#undef cfbSaveAreas
|
#undef cfbSaveAreas
|
||||||
#undef cfbScreenInit
|
#undef cfbScreenInit
|
||||||
|
@ -135,11 +140,13 @@
|
||||||
#undef cfbTEOps1Rect
|
#undef cfbTEOps1Rect
|
||||||
#undef cfbTile32FSCopy
|
#undef cfbTile32FSCopy
|
||||||
#undef cfbTile32FSGeneral
|
#undef cfbTile32FSGeneral
|
||||||
|
#undef cfbUninstallColormap
|
||||||
#undef cfbUnmapWindow
|
#undef cfbUnmapWindow
|
||||||
#undef cfbUnnaturalStippleFS
|
#undef cfbUnnaturalStippleFS
|
||||||
#undef cfbUnnaturalTileFS
|
#undef cfbUnnaturalTileFS
|
||||||
#undef cfbValidateGC
|
#undef cfbValidateGC
|
||||||
#undef cfbVertS
|
#undef cfbVertS
|
||||||
|
#undef cfbWindowPrivateIndex
|
||||||
#undef cfbXRotatePixmap
|
#undef cfbXRotatePixmap
|
||||||
#undef cfbYRotatePixmap
|
#undef cfbYRotatePixmap
|
||||||
#undef cfbZeroPolyArcSS8Copy
|
#undef cfbZeroPolyArcSS8Copy
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
#include "afb.h"
|
#include "afb.h"
|
||||||
|
|
||||||
|
static MODULESETUPPROTO(afbSetup);
|
||||||
|
|
||||||
static XF86ModuleVersionInfo VersRec =
|
static XF86ModuleVersionInfo VersRec =
|
||||||
{
|
{
|
||||||
"afb",
|
"afb",
|
||||||
|
@ -44,6 +46,14 @@ static XF86ModuleVersionInfo VersRec =
|
||||||
{0,0,0,0} /* signature, to be patched into the file by a tool */
|
{0,0,0,0} /* signature, to be patched into the file by a tool */
|
||||||
};
|
};
|
||||||
|
|
||||||
XF86ModuleData afbModuleData = { &VersRec, NULL, NULL };
|
XF86ModuleData afbModuleData = { &VersRec, afbSetup, NULL };
|
||||||
|
|
||||||
|
static pointer
|
||||||
|
afbSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||||
|
{
|
||||||
|
/* This modules requires mfb, so load it */
|
||||||
|
return LoadSubModule(module, "mfb", NULL, NULL, NULL, NULL,
|
||||||
|
errmaj, errmin);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1053,5 +1053,9 @@ mergeRopRec mergeRopBits[16] = {
|
||||||
{ O,O,O,I, }, /* set 0xf 1 */
|
{ O,O,O,I, }, /* set 0xf 1 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mergeRopPtr mergeGetRopBits(int i) {
|
||||||
|
return &mergeRopBits[i];
|
||||||
|
}
|
||||||
|
|
||||||
#undef O
|
#undef O
|
||||||
#undef I
|
#undef I
|
||||||
|
|
|
@ -396,7 +396,7 @@ extern PixelType mfbGetmask(int);
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
register int d = PPW-(x); \
|
register int d = PPW-(x); \
|
||||||
*(pdst) = (*(pdst) & endtab[x]) | (SCRRIGHT((src), x)); \
|
*(pdst) = (*(pdst) & mfbGetendtab(x)) | (SCRRIGHT((src), x)); \
|
||||||
(pdst)[1] = ((pdst)[1] & mfbGetstarttab(n)) | \
|
(pdst)[1] = ((pdst)[1] & mfbGetstarttab(n)) | \
|
||||||
(SCRLEFT(src, d) & mfbGetendtab(n)); \
|
(SCRLEFT(src, d) & mfbGetendtab(n)); \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -39,6 +39,7 @@ typedef struct _mergeRopBits {
|
||||||
} mergeRopRec, *mergeRopPtr;
|
} mergeRopRec, *mergeRopPtr;
|
||||||
|
|
||||||
extern mergeRopRec mergeRopBits[16];
|
extern mergeRopRec mergeRopBits[16];
|
||||||
|
extern mergeRopPtr mergeGetRopBits(int i);
|
||||||
|
|
||||||
#if defined(PPW) && defined(PGSZ) && (PPW != PGSZ) /* cfb */
|
#if defined(PPW) && defined(PGSZ) && (PPW != PGSZ) /* cfb */
|
||||||
#define DeclareMergeRop() MfbBits _ca1 = 0, _cx1 = 0, _ca2 = 0, _cx2 = 0;
|
#define DeclareMergeRop() MfbBits _ca1 = 0, _cx1 = 0, _ca2 = 0, _cx2 = 0;
|
||||||
|
@ -59,7 +60,7 @@ extern mergeRopRec mergeRopBits[16];
|
||||||
MfbBits _pm; \
|
MfbBits _pm; \
|
||||||
mergeRopPtr _bits; \
|
mergeRopPtr _bits; \
|
||||||
_pm = PFILL(pm); \
|
_pm = PFILL(pm); \
|
||||||
_bits = &mergeRopBits[alu]; \
|
_bits = mergeGetRopBits(alu); \
|
||||||
_ca1 = _bits->ca1 & _pm; \
|
_ca1 = _bits->ca1 & _pm; \
|
||||||
_cx1 = _bits->cx1 | ~_pm; \
|
_cx1 = _bits->cx1 | ~_pm; \
|
||||||
_ca2 = _bits->ca2 & _pm; \
|
_ca2 = _bits->ca2 & _pm; \
|
||||||
|
@ -70,7 +71,7 @@ extern mergeRopRec mergeRopBits[16];
|
||||||
#define InitializeMergeRop24(alu,pm) {\
|
#define InitializeMergeRop24(alu,pm) {\
|
||||||
register int i; \
|
register int i; \
|
||||||
register MfbBits _pm = (pm) & 0xFFFFFF; \
|
register MfbBits _pm = (pm) & 0xFFFFFF; \
|
||||||
mergeRopPtr _bits = &mergeRopBits[alu]; \
|
mergeRopPtr _bits = mergeGetRopBits(alu); \
|
||||||
MfbBits _bits_ca1 = _bits->ca1; \
|
MfbBits _bits_ca1 = _bits->ca1; \
|
||||||
MfbBits _bits_cx1 = _bits->cx1; \
|
MfbBits _bits_cx1 = _bits->cx1; \
|
||||||
MfbBits _bits_ca2 = _bits->ca2; \
|
MfbBits _bits_ca2 = _bits->ca2; \
|
||||||
|
@ -88,7 +89,7 @@ extern mergeRopRec mergeRopBits[16];
|
||||||
#define InitializeMergeRop24(alu,pm) {\
|
#define InitializeMergeRop24(alu,pm) {\
|
||||||
register int i; \
|
register int i; \
|
||||||
register MfbBits _pm = (pm) & cfbmask[0]; \
|
register MfbBits _pm = (pm) & cfbmask[0]; \
|
||||||
mergeRopPtr _bits = &mergeRopBits[alu]; \
|
mergeRopPtr _bits = mergeGetRopBits(alu); \
|
||||||
MfbBits _bits_ca1 = _bits->ca1 & cfbmask[0]; \
|
MfbBits _bits_ca1 = _bits->ca1 & cfbmask[0]; \
|
||||||
MfbBits _bits_cx1 = _bits->cx1 & cfbmask[0]; \
|
MfbBits _bits_cx1 = _bits->cx1 & cfbmask[0]; \
|
||||||
MfbBits _bits_ca2 = _bits->ca2 & cfbmask[0]; \
|
MfbBits _bits_ca2 = _bits->ca2 & cfbmask[0]; \
|
||||||
|
@ -111,7 +112,7 @@ extern mergeRopRec mergeRopBits[16];
|
||||||
#else /* mfb */
|
#else /* mfb */
|
||||||
#define InitializeMergeRop(alu,pm) {\
|
#define InitializeMergeRop(alu,pm) {\
|
||||||
mergeRopPtr _bits; \
|
mergeRopPtr _bits; \
|
||||||
_bits = &mergeRopBits[alu]; \
|
_bits = mergeGetRopBits(alu); \
|
||||||
_ca1 = _bits->ca1; \
|
_ca1 = _bits->ca1; \
|
||||||
_cx1 = _bits->cx1; \
|
_cx1 = _bits->cx1; \
|
||||||
_ca2 = _bits->ca2; \
|
_ca2 = _bits->ca2; \
|
||||||
|
@ -328,7 +329,7 @@ extern mergeRopRec mergeRopBits[16];
|
||||||
#define MROP_DECLARE_REG() register MROP_DECLARE()
|
#define MROP_DECLARE_REG() register MROP_DECLARE()
|
||||||
#define MROP_INITIALIZE(alu,pm) { \
|
#define MROP_INITIALIZE(alu,pm) { \
|
||||||
mergeRopPtr _bits; \
|
mergeRopPtr _bits; \
|
||||||
_bits = &mergeRopBits[alu]; \
|
_bits = mergeGetRopBits(alu); \
|
||||||
_ca1 = _bits->ca1; \
|
_ca1 = _bits->ca1; \
|
||||||
_cx1 = _bits->cx1; \
|
_cx1 = _bits->cx1; \
|
||||||
}
|
}
|
||||||
|
|
34
mfb/mfb.h
34
mfb/mfb.h
|
@ -64,7 +64,7 @@ SOFTWARE.
|
||||||
#include "mibstore.h"
|
#include "mibstore.h"
|
||||||
|
|
||||||
extern int InverseAlu[];
|
extern int InverseAlu[];
|
||||||
|
extern int mfbGetInverseAlu(int i);
|
||||||
|
|
||||||
/* warning: PixelType definition duplicated in maskbits.h */
|
/* warning: PixelType definition duplicated in maskbits.h */
|
||||||
#ifndef PixelType
|
#ifndef PixelType
|
||||||
|
@ -229,6 +229,13 @@ extern void mfbRestoreAreas(
|
||||||
extern RegionPtr mfbPixmapToRegion(
|
extern RegionPtr mfbPixmapToRegion(
|
||||||
PixmapPtr /*pPix*/
|
PixmapPtr /*pPix*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifndef MFB_PROTOTYPES_ONLY
|
||||||
|
typedef RegionPtr (*mfbPixmapToRegionProc)(PixmapPtr);
|
||||||
|
|
||||||
|
extern mfbPixmapToRegionProc *mfbPixmapToRegionWeak(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* mfbcmap.c */
|
/* mfbcmap.c */
|
||||||
|
|
||||||
extern int mfbListInstalledColormaps(
|
extern int mfbListInstalledColormaps(
|
||||||
|
@ -371,6 +378,15 @@ extern Bool mfbUnrealizeFont(
|
||||||
ScreenPtr /*pscr*/,
|
ScreenPtr /*pscr*/,
|
||||||
FontPtr /*pFont*/
|
FontPtr /*pFont*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifndef MFB_PROTOTYPES_ONLY
|
||||||
|
typedef void (*mfbRealizeFontProc)(ScreenPtr, FontPtr);
|
||||||
|
typedef void (*mfbUnrealizeFontProc)(ScreenPtr, FontPtr);
|
||||||
|
|
||||||
|
extern mfbRealizeFontProc *mfbRealizeFontWeak(void);
|
||||||
|
extern mfbUnrealizeFontProc *mfbUnrealizeFontWeak(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* mfbgc.c */
|
/* mfbgc.c */
|
||||||
|
|
||||||
extern Bool mfbCreateGC(
|
extern Bool mfbCreateGC(
|
||||||
|
@ -490,6 +506,14 @@ extern void mfbQueryBestSize(
|
||||||
unsigned short * /*pheight*/,
|
unsigned short * /*pheight*/,
|
||||||
ScreenPtr /*pScreen*/
|
ScreenPtr /*pScreen*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifndef MFB_PROTOTYPES_ONLY
|
||||||
|
typedef void (*mfbQueryBestSizeProc)(int, unsigned short *, unsigned short *,
|
||||||
|
ScreenPtr);
|
||||||
|
|
||||||
|
extern mfbQueryBestSizeProc *mfbQueryBestSizeWeak(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* mfbpablack.c */
|
/* mfbpablack.c */
|
||||||
|
|
||||||
extern void mfbSolidBlackArea(
|
extern void mfbSolidBlackArea(
|
||||||
|
@ -680,6 +704,14 @@ extern void mfbPushPixels(
|
||||||
int /*xOrg*/,
|
int /*xOrg*/,
|
||||||
int /*yOrg*/
|
int /*yOrg*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifndef MFB_PROTOTYPES_ONLY
|
||||||
|
typedef void (*mfbPushPixelsProc)(GCPtr, PixmapPtr, DrawablePtr, int, int,
|
||||||
|
int, int);
|
||||||
|
|
||||||
|
extern mfbPushPixelsProc *mfbPushPixelsWeak(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* mfbscrclse.c */
|
/* mfbscrclse.c */
|
||||||
|
|
||||||
extern Bool mfbCloseScreen(
|
extern Bool mfbCloseScreen(
|
||||||
|
|
|
@ -268,3 +268,9 @@ mfbPixmapToRegion(pPix)
|
||||||
#endif
|
#endif
|
||||||
return(pReg);
|
return(pReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mfbPixmapToRegionProc *
|
||||||
|
mfbPixmapToRegionWeak(void)
|
||||||
|
{
|
||||||
|
return mfbPixmapToRegion;
|
||||||
|
}
|
||||||
|
|
|
@ -62,6 +62,12 @@ mfbRealizeFont( pscr, pFont)
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mfbRealizeFontProc *
|
||||||
|
mfbRealizeFontWeak(void)
|
||||||
|
{
|
||||||
|
return mfbRealizeFont;
|
||||||
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
Bool
|
Bool
|
||||||
mfbUnrealizeFont( pscr, pFont)
|
mfbUnrealizeFont( pscr, pFont)
|
||||||
|
@ -70,3 +76,9 @@ mfbUnrealizeFont( pscr, pFont)
|
||||||
{
|
{
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mfbUnrealizeFontProc *
|
||||||
|
mfbUnrealizeFontWeak(void)
|
||||||
|
{
|
||||||
|
return mfbUnrealizeFont;
|
||||||
|
}
|
||||||
|
|
|
@ -1454,6 +1454,12 @@ int InverseAlu[16] = {
|
||||||
GXset
|
GXset
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int mfbGetInverseAlu(i)
|
||||||
|
int i;
|
||||||
|
{
|
||||||
|
return InverseAlu[i];
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
mfbReduceRop(alu, src)
|
mfbReduceRop(alu, src)
|
||||||
register int alu;
|
register int alu;
|
||||||
|
|
|
@ -89,3 +89,8 @@ ScreenPtr pScreen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mfbQueryBestSizeProc *
|
||||||
|
mfbQueryBestSizeWeak(void)
|
||||||
|
{
|
||||||
|
return mfbQueryBestSize;
|
||||||
|
}
|
||||||
|
|
|
@ -276,3 +276,8 @@ mfbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
|
||||||
(*pGC->ops->FillSpans)(pDrawable, pGC, ipt, pt, width, TRUE);
|
(*pGC->ops->FillSpans)(pDrawable, pGC, ipt, pt, width, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mfbPushPixelsProc *mfbPushPixelsWeak(void)
|
||||||
|
{
|
||||||
|
return mfbPushPixels;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue