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

View File

@ -42,7 +42,7 @@ in this Software without prior written authorization from The Open Group.
#include "cfbmskbits.h"
#include "mibstore.h"
#if PSZ==8
#if 1 || PSZ==8
int cfbWindowPrivateIndex;
int cfbGCPrivateIndex;
#endif

View File

@ -973,15 +973,15 @@ cfbCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask)
#else /* PSZ == 8 */
#define mfbmaskbits(x, w, startmask, endmask, nlw) \
startmask = starttab[(x)&0x1f]; \
endmask = endtab[((x)+(w)) & 0x1f]; \
startmask = mfbGetstarttab((x)&0x1f); \
endmask = mfbGetendtab(((x)+(w)) & 0x1f); \
if (startmask) \
nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \
else \
nlw = (w) >> 5;
#define mfbmaskpartialbits(x, w, mask) \
mask = partmasks[(x)&0x1f][(w)&0x1f];
mask = mfbGetpartmasks((x)&0x1f,(w)&0x1f);
#define LeftMost 0
#define StepBit(bit, inc) ((bit) += (inc))
@ -1389,7 +1389,7 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
oldalu = pGC->alu;
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))
pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel);
ret = cfbCopyPlaneReduce(pSrcDrawable, pDstDrawable,

View File

@ -245,15 +245,15 @@ cfbCopyPlane8to1(
#else /* PSZ == 8 */
#define mfbmaskbits(x, w, startmask, endmask, nlw) \
startmask = starttab[(x)&0x1f]; \
endmask = endtab[((x)+(w)) & 0x1f]; \
startmask = mfbGetstarttab((x)&0x1f); \
endmask = mfbGetendtab(((x)+(w)) & 0x1f); \
if (startmask) \
nlw = (((w) - (32 - ((x)&0x1f))) >> 5); \
else \
nlw = (w) >> 5;
#define mfbmaskpartialbits(x, w, mask) \
mask = partmasks[(x)&0x1f][(w)&0x1f];
mask = mfbGetpartmasks((x)&0x1f,(w)&0x1f);
#define LeftMost 0
#define StepBit(bit, inc) ((bit) += (inc))

View File

@ -85,11 +85,13 @@ SOFTWARE.
# define usePolyGlyphBlt miPolyGlyphBlt
#endif
void cfbUnPushPixels (GCPtr, PixmapPtr, DrawablePtr, int, int, int, int);
#ifdef FOUR_BIT_CODE
# define usePushPixels cfbPushPixels8
#else
#ifndef LOWMEMFTPT
# define usePushPixels mfbPushPixels
# define usePushPixels cfbUnPushPixels
#else
# define usePushPixels miPushPixels
#endif /* ifndef LOWMEMFTPT */
@ -284,6 +286,14 @@ cfbCreateGC(pGC)
pGC->clientClip = NULL;
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
* will be filled in ValidateGC because of dix/CreateGC() setting all
@ -767,7 +777,7 @@ cfbValidateGC(pGC, changes, pDrawable)
#endif
#ifdef FOUR_BIT_CODE
#ifndef LOWMEMFTPT
pGC->ops->PushPixels = mfbPushPixels;
pGC->ops->PushPixels = mfbPushPixelsWeak();
#else
pGC->ops->PushPixels = miPushPixels;
#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;
}

View File

@ -64,7 +64,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef USE_LEFTBITS
typedef unsigned char *glyphPointer;
extern CfbBits endtab[];
#define GlyphBits(bits,width,dst) getleftbits(bits,width,dst); \
(dst) &= widthMask; \
@ -251,7 +250,7 @@ cfbPolyGlyphBlt8 (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
#ifdef USE_LEFTBITS
w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
widthGlyph = PADGLYPHWIDTHBYTES(w);
widthMask = endtab[w];
widthMask = mfbGetendtab(w);
#endif
do {
dst = dstLine;
@ -380,7 +379,7 @@ cfbPolyGlyphBlt8Clipped(
#ifdef USE_LEFTBITS
w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
widthGlyph = PADGLYPHWIDTHBYTES(w);
widthMask = endtab[w];
widthMask = mfbGetendtab(w);
#endif
switch (cfb8ComputeClipMasks32 (pBox, numRects, xG, yG, w, hTmp, clips))
{

View File

@ -94,13 +94,17 @@ in this Software without prior written authorization from The Open Group.
#undef cfbFillSpanTileOddGeneral
#undef cfbFinishScreenInit
#undef cfbGCFuncs
#undef cfbGCPrivateIndex
#undef cfbGetImage
#undef cfbGetScreenPixmap
#undef cfbGetSpans
#undef cfbHorzS
#undef cfbImageGlyphBlt8
#undef cfbInitializeColormap
#undef cfbInstallColormap
#undef cfbLineSD
#undef cfbLineSS
#undef cfbListInstalledColormaps
#undef cfbMapWindow
#undef cfbMatchCommon
#undef cfbNonTEOps
@ -116,6 +120,7 @@ in this Software without prior written authorization from The Open Group.
#undef cfbPositionWindow
#undef cfbPutImage
#undef cfbReduceRasterOp
#undef cfbResolveColor
#undef cfbRestoreAreas
#undef cfbSaveAreas
#undef cfbScreenInit
@ -136,11 +141,13 @@ in this Software without prior written authorization from The Open Group.
#undef cfbTEOps1Rect
#undef cfbTile32FSCopy
#undef cfbTile32FSGeneral
#undef cfbUninstallColormap
#undef cfbUnmapWindow
#undef cfbUnnaturalStippleFS
#undef cfbUnnaturalTileFS
#undef cfbValidateGC
#undef cfbVertS
#undef cfbWindowPrivateIndex
#undef cfbXRotatePixmap
#undef cfbYRotatePixmap
#undef cfbZeroPolyArcSS8Copy
@ -263,13 +270,17 @@ cfb can not hack PSZ yet
#define cfbFillSpanTileOddGeneral CFBNAME(FillSpanTileOddGeneral)
#define cfbFinishScreenInit CFBNAME(FinishScreenInit)
#define cfbGCFuncs CFBNAME(GCFuncs)
#define cfbGCPrivateIndex CFBNAME(GCPrivateIndex)
#define cfbGetImage CFBNAME(GetImage)
#define cfbGetScreenPixmap CFBNAME(GetScreenPixmap)
#define cfbGetSpans CFBNAME(GetSpans)
#define cfbHorzS CFBNAME(HorzS)
#define cfbImageGlyphBlt8 CFBNAME(ImageGlyphBlt8)
#define cfbInitializeColormap CFBNAME(InitializeColormap)
#define cfbInstallColormap CFBNAME(InstallColormap)
#define cfbLineSD CFBNAME(LineSD)
#define cfbLineSS CFBNAME(LineSS)
#define cfbListInstalledColormaps CFBNAME(ListInstalledColormaps)
#define cfbMapWindow CFBNAME(MapWindow)
#define cfbMatchCommon CFBNAME(MatchCommon)
#define cfbNonTEOps CFBNAME(NonTEOps)
@ -285,6 +296,7 @@ cfb can not hack PSZ yet
#define cfbPositionWindow CFBNAME(PositionWindow)
#define cfbPutImage CFBNAME(PutImage)
#define cfbReduceRasterOp CFBNAME(ReduceRasterOp)
#define cfbResolveColor CFBNAME(ResolveColor)
#define cfbRestoreAreas CFBNAME(RestoreAreas)
#define cfbSaveAreas CFBNAME(SaveAreas)
#define cfbScreenInit CFBNAME(ScreenInit)
@ -305,11 +317,13 @@ cfb can not hack PSZ yet
#define cfbTEOps1Rect CFBNAME(TEOps1Rect)
#define cfbTile32FSCopy CFBNAME(Tile32FSCopy)
#define cfbTile32FSGeneral CFBNAME(Tile32FSGeneral)
#define cfbUninstallColormap CFBNAME(UninstallColormap)
#define cfbUnmapWindow CFBNAME(UnmapWindow)
#define cfbUnnaturalStippleFS CFBNAME(UnnaturalStippleFS)
#define cfbUnnaturalTileFS CFBNAME(UnnaturalTileFS)
#define cfbValidateGC CFBNAME(ValidateGC)
#define cfbVertS CFBNAME(VertS)
#define cfbWindowPrivateIndex CFBNAME(WindowPrivateIndex)
#define cfbXRotatePixmap CFBNAME(XRotatePixmap)
#define cfbYRotatePixmap CFBNAME(YRotatePixmap)
#define cfbZeroPolyArcSS8Copy CFBNAME(ZeroPolyArcSSCopy)

View File

@ -60,8 +60,6 @@ SOFTWARE.
#include "cfb.h"
#include "cfbmskbits.h"
extern CfbBits endtab[];
PixmapPtr
cfbCreatePixmap (pScreen, width, height, depth)
ScreenPtr pScreen;
@ -160,7 +158,7 @@ cfbPadPixmap(pPixmap)
if (rep*width != PGSZ)
return;
mask = endtab[width];
mask = mfbGetendtab(width);
p = (CfbBits *)(pPixmap->devPrivate.ptr);
for (h=0; h < pPixmap->drawable.height; h++)

View File

@ -99,7 +99,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->defColormap = FakeClientID(0);
/* let CreateDefColormap do whatever it wants for pixels */
pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0;
pScreen->QueryBestSize = mfbQueryBestSize;
pScreen->QueryBestSize = mfbQueryBestSizeWeak();
/* SaveScreen */
pScreen->GetImage = cfbGetImage;
pScreen->GetSpans = cfbGetSpans;
@ -114,8 +114,8 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->CopyWindow = cfbCopyWindow;
pScreen->CreatePixmap = cfbCreatePixmap;
pScreen->DestroyPixmap = cfbDestroyPixmap;
pScreen->RealizeFont = mfbRealizeFont;
pScreen->UnrealizeFont = mfbUnrealizeFont;
pScreen->RealizeFont = mfbRealizeFontWeak();
pScreen->UnrealizeFont = mfbUnrealizeFontWeak();
pScreen->CreateGC = cfbCreateGC;
pScreen->CreateColormap = cfbInitializeColormap;
pScreen->DestroyColormap = DestroyColormapNoop;
@ -124,7 +124,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->ListInstalledColormaps = cfbListInstalledColormaps;
pScreen->StoreColors = StoreColorsNoop;
pScreen->ResolveColor = cfbResolveColor;
pScreen->BitmapToRegion = mfbPixmapToRegion;
pScreen->BitmapToRegion = mfbPixmapToRegionWeak();
mfbRegisterCopyPlaneProc (pScreen, cfbCopyPlane);
return TRUE;

View File

@ -4,7 +4,9 @@
#define _CFBTAB_H_
/* prototypes */
#if 0
extern int starttab[32], endtab[32];
extern unsigned int partmasks[32][32];
#endif
#endif /* _CFBTAB_H_ */

View File

@ -160,7 +160,6 @@ typedef unsigned int *glyphPointer;
#endif
#ifdef USE_LEFTBITS
extern CfbBits endtab[];
#define IncChar(c) (c = (glyphPointer) (((char *) c) + glyphBytes))
@ -408,7 +407,7 @@ CFBTEGBLT8 (pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase)
#endif
#ifdef USE_LEFTBITS
glyphMask = endtab[widthGlyph];
glyphMask = mfbGetendtab(widthGlyph);
glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);
#endif

View File

@ -93,13 +93,17 @@
#undef cfbFillSpanTileOddGeneral
#undef cfbFinishScreenInit
#undef cfbGCFuncs
#undef cfbGCPrivateIndex
#undef cfbGetImage
#undef cfbGetScreenPixmap
#undef cfbGetSpans
#undef cfbHorzS
#undef cfbImageGlyphBlt8
#undef cfbInitializeColormap
#undef cfbInstallColormap
#undef cfbLineSD
#undef cfbLineSS
#undef cfbListInstalledColormaps
#undef cfbMapWindow
#undef cfbMatchCommon
#undef cfbNonTEOps
@ -115,6 +119,7 @@
#undef cfbPositionWindow
#undef cfbPutImage
#undef cfbReduceRasterOp
#undef cfbResolveColor
#undef cfbRestoreAreas
#undef cfbSaveAreas
#undef cfbScreenInit
@ -135,11 +140,13 @@
#undef cfbTEOps1Rect
#undef cfbTile32FSCopy
#undef cfbTile32FSGeneral
#undef cfbUninstallColormap
#undef cfbUnmapWindow
#undef cfbUnnaturalStippleFS
#undef cfbUnnaturalTileFS
#undef cfbValidateGC
#undef cfbVertS
#undef cfbWindowPrivateIndex
#undef cfbXRotatePixmap
#undef cfbYRotatePixmap
#undef cfbZeroPolyArcSS8Copy

View File

@ -30,6 +30,8 @@
#include "xf86Module.h"
#include "afb.h"
static MODULESETUPPROTO(afbSetup);
static XF86ModuleVersionInfo VersRec =
{
"afb",
@ -44,6 +46,14 @@ static XF86ModuleVersionInfo VersRec =
{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

View File

@ -1053,5 +1053,9 @@ mergeRopRec mergeRopBits[16] = {
{ O,O,O,I, }, /* set 0xf 1 */
};
mergeRopPtr mergeGetRopBits(int i) {
return &mergeRopBits[i];
}
#undef O
#undef I

View File

@ -396,7 +396,7 @@ extern PixelType mfbGetmask(int);
else \
{ \
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)) | \
(SCRLEFT(src, d) & mfbGetendtab(n)); \
} \

View File

@ -39,6 +39,7 @@ typedef struct _mergeRopBits {
} mergeRopRec, *mergeRopPtr;
extern mergeRopRec mergeRopBits[16];
extern mergeRopPtr mergeGetRopBits(int i);
#if defined(PPW) && defined(PGSZ) && (PPW != PGSZ) /* cfb */
#define DeclareMergeRop() MfbBits _ca1 = 0, _cx1 = 0, _ca2 = 0, _cx2 = 0;
@ -59,7 +60,7 @@ extern mergeRopRec mergeRopBits[16];
MfbBits _pm; \
mergeRopPtr _bits; \
_pm = PFILL(pm); \
_bits = &mergeRopBits[alu]; \
_bits = mergeGetRopBits(alu); \
_ca1 = _bits->ca1 & _pm; \
_cx1 = _bits->cx1 | ~_pm; \
_ca2 = _bits->ca2 & _pm; \
@ -70,7 +71,7 @@ extern mergeRopRec mergeRopBits[16];
#define InitializeMergeRop24(alu,pm) {\
register int i; \
register MfbBits _pm = (pm) & 0xFFFFFF; \
mergeRopPtr _bits = &mergeRopBits[alu]; \
mergeRopPtr _bits = mergeGetRopBits(alu); \
MfbBits _bits_ca1 = _bits->ca1; \
MfbBits _bits_cx1 = _bits->cx1; \
MfbBits _bits_ca2 = _bits->ca2; \
@ -88,7 +89,7 @@ extern mergeRopRec mergeRopBits[16];
#define InitializeMergeRop24(alu,pm) {\
register int i; \
register MfbBits _pm = (pm) & cfbmask[0]; \
mergeRopPtr _bits = &mergeRopBits[alu]; \
mergeRopPtr _bits = mergeGetRopBits(alu); \
MfbBits _bits_ca1 = _bits->ca1 & cfbmask[0]; \
MfbBits _bits_cx1 = _bits->cx1 & cfbmask[0]; \
MfbBits _bits_ca2 = _bits->ca2 & cfbmask[0]; \
@ -111,7 +112,7 @@ extern mergeRopRec mergeRopBits[16];
#else /* mfb */
#define InitializeMergeRop(alu,pm) {\
mergeRopPtr _bits; \
_bits = &mergeRopBits[alu]; \
_bits = mergeGetRopBits(alu); \
_ca1 = _bits->ca1; \
_cx1 = _bits->cx1; \
_ca2 = _bits->ca2; \
@ -328,7 +329,7 @@ extern mergeRopRec mergeRopBits[16];
#define MROP_DECLARE_REG() register MROP_DECLARE()
#define MROP_INITIALIZE(alu,pm) { \
mergeRopPtr _bits; \
_bits = &mergeRopBits[alu]; \
_bits = mergeGetRopBits(alu); \
_ca1 = _bits->ca1; \
_cx1 = _bits->cx1; \
}

View File

@ -64,7 +64,7 @@ SOFTWARE.
#include "mibstore.h"
extern int InverseAlu[];
extern int mfbGetInverseAlu(int i);
/* warning: PixelType definition duplicated in maskbits.h */
#ifndef PixelType
@ -229,6 +229,13 @@ extern void mfbRestoreAreas(
extern RegionPtr mfbPixmapToRegion(
PixmapPtr /*pPix*/
);
#ifndef MFB_PROTOTYPES_ONLY
typedef RegionPtr (*mfbPixmapToRegionProc)(PixmapPtr);
extern mfbPixmapToRegionProc *mfbPixmapToRegionWeak(void);
#endif
/* mfbcmap.c */
extern int mfbListInstalledColormaps(
@ -371,6 +378,15 @@ extern Bool mfbUnrealizeFont(
ScreenPtr /*pscr*/,
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 */
extern Bool mfbCreateGC(
@ -490,6 +506,14 @@ extern void mfbQueryBestSize(
unsigned short * /*pheight*/,
ScreenPtr /*pScreen*/
);
#ifndef MFB_PROTOTYPES_ONLY
typedef void (*mfbQueryBestSizeProc)(int, unsigned short *, unsigned short *,
ScreenPtr);
extern mfbQueryBestSizeProc *mfbQueryBestSizeWeak(void);
#endif
/* mfbpablack.c */
extern void mfbSolidBlackArea(
@ -680,6 +704,14 @@ extern void mfbPushPixels(
int /*xOrg*/,
int /*yOrg*/
);
#ifndef MFB_PROTOTYPES_ONLY
typedef void (*mfbPushPixelsProc)(GCPtr, PixmapPtr, DrawablePtr, int, int,
int, int);
extern mfbPushPixelsProc *mfbPushPixelsWeak(void);
#endif
/* mfbscrclse.c */
extern Bool mfbCloseScreen(

View File

@ -268,3 +268,9 @@ mfbPixmapToRegion(pPix)
#endif
return(pReg);
}
mfbPixmapToRegionProc *
mfbPixmapToRegionWeak(void)
{
return mfbPixmapToRegion;
}

View File

@ -62,6 +62,12 @@ mfbRealizeFont( pscr, pFont)
return (TRUE);
}
mfbRealizeFontProc *
mfbRealizeFontWeak(void)
{
return mfbRealizeFont;
}
/*ARGSUSED*/
Bool
mfbUnrealizeFont( pscr, pFont)
@ -70,3 +76,9 @@ mfbUnrealizeFont( pscr, pFont)
{
return (TRUE);
}
mfbUnrealizeFontProc *
mfbUnrealizeFontWeak(void)
{
return mfbUnrealizeFont;
}

View File

@ -1454,6 +1454,12 @@ int InverseAlu[16] = {
GXset
};
int mfbGetInverseAlu(i)
int i;
{
return InverseAlu[i];
}
int
mfbReduceRop(alu, src)
register int alu;

View File

@ -89,3 +89,8 @@ ScreenPtr pScreen;
}
}
mfbQueryBestSizeProc *
mfbQueryBestSizeWeak(void)
{
return mfbQueryBestSize;
}

View File

@ -276,3 +276,8 @@ mfbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
(*pGC->ops->FillSpans)(pDrawable, pGC, ipt, pt, width, TRUE);
}
}
mfbPushPixelsProc *mfbPushPixelsWeak(void)
{
return mfbPushPixels;
}