diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2005-01-14 08:37:30 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2005-01-14 08:37:30 +0000 |
commit | 2137bc6eb9f36f4ba999023d83c637024f3a6e4c (patch) | |
tree | f69d77a91fc5a74cac78c5fdfccdf473e48b4263 /cfb | |
parent | 61b3c3aef5437f14d413a60da792257b01e9f8fa (diff) |
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>.
Diffstat (limited to 'cfb')
-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 |
11 files changed, 65 insertions, 22 deletions
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 |