diff options
-rw-r--r-- | afb/afbbres.c | 6 | ||||
-rw-r--r-- | afb/afbbresd.c | 6 | ||||
-rw-r--r-- | afb/afbclip.c | 2 | ||||
-rw-r--r-- | afb/afbhrzvert.c | 6 | ||||
-rw-r--r-- | afb/afbline.c | 12 | ||||
-rw-r--r-- | afb/afbpixmap.c | 4 | ||||
-rw-r--r-- | afb/afbpolypnt.c | 6 | ||||
-rw-r--r-- | afb/afbpushpxl.c | 4 | ||||
-rw-r--r-- | afb/afbtegblt.c | 2 | ||||
-rw-r--r-- | cfb/cfballpriv.c | 2 | ||||
-rw-r--r-- | cfb/cfbbitblt.c | 8 | ||||
-rw-r--r-- | cfb/cfbcppl.c | 6 | ||||
-rw-r--r-- | cfb/cfbgc.c | 28 | ||||
-rw-r--r-- | cfb/cfbglblt8.c | 5 | ||||
-rw-r--r-- | cfb/cfbmap.h | 14 | ||||
-rw-r--r-- | cfb/cfbpixmap.c | 4 | ||||
-rw-r--r-- | cfb/cfbscrinit.c | 8 | ||||
-rw-r--r-- | cfb/cfbtab.h | 2 | ||||
-rw-r--r-- | cfb/cfbteblt8.c | 3 | ||||
-rw-r--r-- | cfb/cfbunmap.h | 7 | ||||
-rw-r--r-- | hw/xfree86/dixmods/afbmodule.c | 12 | ||||
-rw-r--r-- | mfb/maskbits.c | 4 | ||||
-rw-r--r-- | mfb/maskbits.h | 2 | ||||
-rw-r--r-- | mfb/mergerop.h | 11 | ||||
-rw-r--r-- | mfb/mfb.h | 34 | ||||
-rw-r--r-- | mfb/mfbclip.c | 6 | ||||
-rw-r--r-- | mfb/mfbfont.c | 12 | ||||
-rw-r--r-- | mfb/mfbgc.c | 6 | ||||
-rw-r--r-- | mfb/mfbmisc.c | 5 | ||||
-rw-r--r-- | mfb/mfbpushpxl.c | 5 |
30 files changed, 178 insertions, 54 deletions
diff --git a/afb/afbbres.c b/afb/afbbres.c index 732ea65fa..d09a47485 100644 --- a/afb/afbbres.c +++ b/afb/afbbres.c @@ -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: diff --git a/afb/afbbresd.c b/afb/afbbresd.c index 581ecb84f..0b0d5d6fe 100644 --- a/afb/afbbresd.c +++ b/afb/afbbresd.c @@ -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) diff --git a/afb/afbclip.c b/afb/afbclip.c index 0acf35b2a..3930342d9 100644 --- a/afb/afbclip.c +++ b/afb/afbclip.c @@ -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; diff --git a/afb/afbhrzvert.c b/afb/afbhrzvert.c index 7165afd51..3578b2892 100644 --- a/afb/afbhrzvert.c +++ b/afb/afbhrzvert.c @@ -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; diff --git a/afb/afbline.c b/afb/afbline.c index 221e2ddd7..9e9065705 100644 --- a/afb/afbline.c +++ b/afb/afbline.c @@ -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: diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c index 951ec9946..23b51d539 100644 --- a/afb/afbpixmap.c +++ b/afb/afbpixmap.c @@ -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 diff --git a/afb/afbpolypnt.c b/afb/afbpolypnt.c index 23dca7416..f1ff5bb41 100644 --- a/afb/afbpolypnt.c +++ b/afb/afbpolypnt.c @@ -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; diff --git a/afb/afbpushpxl.c b/afb/afbpushpxl.c index 311becb8a..026d09c21 100644 --- a/afb/afbpushpxl.c +++ b/afb/afbpushpxl.c @@ -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) { diff --git a/afb/afbtegblt.c b/afb/afbtegblt.c index a4acf326f..a544f9aa9 100644 --- a/afb/afbtegblt.c +++ b/afb/afbtegblt.c @@ -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 diff --git a/cfb/cfballpriv.c b/cfb/cfballpriv.c index 8b2468992..e107d9ccf 100644 --- a/cfb/cfballpriv.c +++ b/cfb/cfballpriv.c @@ -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 diff --git a/cfb/cfbbitblt.c b/cfb/cfbbitblt.c index b8ef23301..b822de61e 100644 --- a/cfb/cfbbitblt.c +++ b/cfb/cfbbitblt.c @@ -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, diff --git a/cfb/cfbcppl.c b/cfb/cfbcppl.c index a2a51a452..54360e95c 100644 --- a/cfb/cfbcppl.c +++ b/cfb/cfbcppl.c @@ -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)) diff --git a/cfb/cfbgc.c b/cfb/cfbgc.c index b4a9cc484..6c5d69d44 100644 --- a/cfb/cfbgc.c +++ b/cfb/cfbgc.c @@ -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; +} diff --git a/cfb/cfbglblt8.c b/cfb/cfbglblt8.c index c0fb01c0e..b850723df 100644 --- a/cfb/cfbglblt8.c +++ b/cfb/cfbglblt8.c @@ -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)) { diff --git a/cfb/cfbmap.h b/cfb/cfbmap.h index 60fa94df2..f398f129d 100644 --- a/cfb/cfbmap.h +++ b/cfb/cfbmap.h @@ -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) diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index 3502e879c..53ea34c45 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -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++) diff --git a/cfb/cfbscrinit.c b/cfb/cfbscrinit.c index ffdf55b81..2bc0befd3 100644 --- a/cfb/cfbscrinit.c +++ b/cfb/cfbscrinit.c @@ -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; diff --git a/cfb/cfbtab.h b/cfb/cfbtab.h index c27f69312..f81855103 100644 --- a/cfb/cfbtab.h +++ b/cfb/cfbtab.h @@ -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_ */ diff --git a/cfb/cfbteblt8.c b/cfb/cfbteblt8.c index 9048ec375..3e00393bf 100644 --- a/cfb/cfbteblt8.c +++ b/cfb/cfbteblt8.c @@ -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 diff --git a/cfb/cfbunmap.h b/cfb/cfbunmap.h index af1754c40..b54023212 100644 --- a/cfb/cfbunmap.h +++ b/cfb/cfbunmap.h @@ -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 diff --git a/hw/xfree86/dixmods/afbmodule.c b/hw/xfree86/dixmods/afbmodule.c index ac7049c10..7920aa9bd 100644 --- a/hw/xfree86/dixmods/afbmodule.c +++ b/hw/xfree86/dixmods/afbmodule.c @@ -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 diff --git a/mfb/maskbits.c b/mfb/maskbits.c index 4cd2d493b..8f99f2026 100644 --- a/mfb/maskbits.c +++ b/mfb/maskbits.c @@ -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 diff --git a/mfb/maskbits.h b/mfb/maskbits.h index 5ca79c929..654ab3d0e 100644 --- a/mfb/maskbits.h +++ b/mfb/maskbits.h @@ -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)); \ } \ diff --git a/mfb/mergerop.h b/mfb/mergerop.h index e54e1f906..6b5548b12 100644 --- a/mfb/mergerop.h +++ b/mfb/mergerop.h @@ -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; \ } @@ -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( diff --git a/mfb/mfbclip.c b/mfb/mfbclip.c index 3b36819ef..7c9be7f97 100644 --- a/mfb/mfbclip.c +++ b/mfb/mfbclip.c @@ -268,3 +268,9 @@ mfbPixmapToRegion(pPix) #endif return(pReg); } + +mfbPixmapToRegionProc * +mfbPixmapToRegionWeak(void) +{ + return mfbPixmapToRegion; +} diff --git a/mfb/mfbfont.c b/mfb/mfbfont.c index 499dac52a..f77e70a26 100644 --- a/mfb/mfbfont.c +++ b/mfb/mfbfont.c @@ -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; +} diff --git a/mfb/mfbgc.c b/mfb/mfbgc.c index aec4c2e7f..c7dccf93d 100644 --- a/mfb/mfbgc.c +++ b/mfb/mfbgc.c @@ -1454,6 +1454,12 @@ int InverseAlu[16] = { GXset }; +int mfbGetInverseAlu(i) + int i; +{ + return InverseAlu[i]; +} + int mfbReduceRop(alu, src) register int alu; diff --git a/mfb/mfbmisc.c b/mfb/mfbmisc.c index 67cbf6fc6..c3e0d3d71 100644 --- a/mfb/mfbmisc.c +++ b/mfb/mfbmisc.c @@ -89,3 +89,8 @@ ScreenPtr pScreen; } } +mfbQueryBestSizeProc * +mfbQueryBestSizeWeak(void) +{ + return mfbQueryBestSize; +} diff --git a/mfb/mfbpushpxl.c b/mfb/mfbpushpxl.c index 0410af192..b268c559f 100644 --- a/mfb/mfbpushpxl.c +++ b/mfb/mfbpushpxl.c @@ -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; +} |