fb: drop defines that aren't used/necessary anymore.

This was generated by:
cd fb
coan source --replace -DFB_SCREEN_PRIVATE -DFB_24BIT -DFB_24_32BIT -DFB_SCREEN_PRIVATE -UFBNOPIXADDR -UFBNO24BIT -UFBNO24_32 *.[ch]

A follow up patch readds the FB_24_32BIT define for Intel UXA.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Dave Airlie 2011-03-29 14:27:41 +10:00
parent e0a2ad51df
commit be9cfb249d
21 changed files with 0 additions and 155 deletions

27
fb/fb.h
View File

@ -98,20 +98,12 @@
#error "GLYPHPADBYTES must be 4" #error "GLYPHPADBYTES must be 4"
#endif #endif
/* whether to bother to include 24bpp support */ /* whether to bother to include 24bpp support */
#ifndef FBNO24BIT
#define FB_24BIT
#endif
/* /*
* Unless otherwise instructed, fb includes code to advertise 24bpp * Unless otherwise instructed, fb includes code to advertise 24bpp
* windows with 32bpp image format for application compatibility * windows with 32bpp image format for application compatibility
*/ */
#ifdef FB_24BIT
#ifndef FBNO24_32
#define FB_24_32BIT
#endif
#endif
#define FB_STIP_SHIFT LOG2_BITMAP_PAD #define FB_STIP_SHIFT LOG2_BITMAP_PAD
#define FB_STIP_UNIT (1 << FB_STIP_SHIFT) #define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
@ -234,15 +226,6 @@ extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
n >>= FB_SHIFT; \ n >>= FB_SHIFT; \
} }
#ifdef FBNOPIXADDR
#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
*dst = FbDoMaskRRop(*dst,and,xor,l); \
}
#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
*dst = FbDoMaskRRop(*dst,and,xor,r); \
}
#else
#define FbByteMaskInvalid 0x10 #define FbByteMaskInvalid 0x10
@ -454,7 +437,6 @@ extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \ WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
} \ } \
} }
#endif
#define FbMaskStip(x,w,l,n,r) { \ #define FbMaskStip(x,w,l,n,r) { \
n = (w); \ n = (w); \
@ -612,9 +594,6 @@ fbGetWinPrivateKey (void);
extern _X_EXPORT const GCOps fbGCOps; extern _X_EXPORT const GCOps fbGCOps;
extern _X_EXPORT const GCFuncs fbGCFuncs; extern _X_EXPORT const GCFuncs fbGCFuncs;
#ifdef FB_24_32BIT
#define FB_SCREEN_PRIVATE
#endif
/* Framebuffer access wrapper */ /* Framebuffer access wrapper */
typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size); typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
@ -642,7 +621,6 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
#endif #endif
#ifdef FB_SCREEN_PRIVATE
extern _X_EXPORT DevPrivateKey extern _X_EXPORT DevPrivateKey
fbGetScreenPrivateKey(void); fbGetScreenPrivateKey(void);
@ -658,7 +636,6 @@ typedef struct {
#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey())) dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
#endif
/* private field of GC */ /* private field of GC */
typedef struct { typedef struct {
@ -1223,7 +1200,6 @@ fbBltOne (FbStip *src,
FbBits bgand, FbBits bgand,
FbBits bgxor); FbBits bgxor);
#ifdef FB_24BIT
extern _X_EXPORT void extern _X_EXPORT void
fbBltOne24 (FbStip *src, fbBltOne24 (FbStip *src,
FbStride srcStride, /* FbStip units per scanline */ FbStride srcStride, /* FbStip units per scanline */
@ -1240,7 +1216,6 @@ fbBltOne24 (FbStip *src,
FbBits fgxor, FbBits fgxor,
FbBits bgand, FbBits bgand,
FbBits bgxor); FbBits bgxor);
#endif
extern _X_EXPORT void extern _X_EXPORT void
fbBltPlane (FbBits *src, fbBltPlane (FbBits *src,
@ -1868,7 +1843,6 @@ fbSolid (FbBits *dst,
FbBits and, FbBits and,
FbBits xor); FbBits xor);
#ifdef FB_24BIT
extern _X_EXPORT void extern _X_EXPORT void
fbSolid24 (FbBits *dst, fbSolid24 (FbBits *dst,
FbStride dstStride, FbStride dstStride,
@ -1879,7 +1853,6 @@ fbSolid24 (FbBits *dst,
FbBits and, FbBits and,
FbBits xor); FbBits xor);
#endif
/* /*
* fbstipple.c * fbstipple.c

View File

@ -26,11 +26,9 @@
#include "fb.h" #include "fb.h"
#ifdef FB_SCREEN_PRIVATE
static DevPrivateKeyRec fbScreenPrivateKeyRec; static DevPrivateKeyRec fbScreenPrivateKeyRec;
DevPrivateKey DevPrivateKey
fbGetScreenPrivateKey(void) { return &fbScreenPrivateKeyRec; } fbGetScreenPrivateKey(void) { return &fbScreenPrivateKeyRec; }
#endif
static DevPrivateKeyRec fbGCPrivateKeyRec; static DevPrivateKeyRec fbGCPrivateKeyRec;
DevPrivateKey DevPrivateKey
@ -48,10 +46,8 @@ fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey)
if (!dixRegisterPrivateKey(&fbGCPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec))) if (!dixRegisterPrivateKey(&fbGCPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec)))
return FALSE; return FALSE;
#ifdef FB_SCREEN_PRIVATE
if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof (FbScreenPrivRec))) if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof (FbScreenPrivRec)))
return FALSE; return FALSE;
#endif
if (!dixRegisterPrivateKey(&fbWinPrivateKeyRec, PRIVATE_WINDOW, 0)) if (!dixRegisterPrivateKey(&fbWinPrivateKeyRec, PRIVATE_WINDOW, 0))
return FALSE; return FALSE;

View File

@ -47,7 +47,6 @@ fbPolyArc (DrawablePtr pDrawable,
if (pGC->lineWidth == 0) if (pGC->lineWidth == 0)
{ {
#ifndef FBNOPIXADDR
arc = 0; arc = 0;
if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid) if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid)
{ {
@ -55,9 +54,7 @@ fbPolyArc (DrawablePtr pDrawable,
{ {
case 8: arc = fbArc8; break; case 8: arc = fbArc8; break;
case 16: arc = fbArc16; break; case 16: arc = fbArc16; break;
#ifdef FB_24BIT
case 24: arc = fbArc24; break; case 24: arc = fbArc24; break;
#endif
case 32: arc = fbArc32; break; case 32: arc = fbArc32; break;
} }
} }
@ -141,7 +138,6 @@ fbPolyArc (DrawablePtr pDrawable,
#endif #endif
} }
else else
#endif
miZeroPolyArc (pDrawable, pGC, narcs, parcs); miZeroPolyArc (pDrawable, pGC, narcs, parcs);
} }
else else

View File

@ -89,7 +89,6 @@
#undef BITS4 #undef BITS4
#endif #endif
#ifdef FB_24BIT
#define BRESSOLID fbBresSolid24 #define BRESSOLID fbBresSolid24
#define BRESDASH fbBresDash24 #define BRESDASH fbBresDash24
#define DOTS fbDots24 #define DOTS fbDots24
@ -147,7 +146,6 @@
#undef ARC #undef ARC
#undef POLYLINE #undef POLYLINE
#undef POLYSEGMENT #undef POLYSEGMENT
#endif /* FB_24BIT */
#define BRESSOLID fbBresSolid32 #define BRESSOLID fbBresSolid32
#define BRESDASH fbBresDash32 #define BRESDASH fbBresDash32

View File

@ -67,14 +67,12 @@ fbBlt (FbBits *srcLine,
int startbyte, endbyte; int startbyte, endbyte;
FbDeclareMergeRop (); FbDeclareMergeRop ();
#ifdef FB_24BIT
if (bpp == 24 && !FbCheck24Pix (pm)) if (bpp == 24 && !FbCheck24Pix (pm))
{ {
fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX, fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
width, height, alu, pm, reverse, upsidedown); width, height, alu, pm, reverse, upsidedown);
return; return;
} }
#endif
if (alu == GXcopy && pm == FB_ALLONES && !reverse && if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
!(srcX & 7) && !(dstX & 7) && !(width & 7)) { !(srcX & 7) && !(dstX & 7) && !(width & 7)) {
@ -338,7 +336,6 @@ fbBlt (FbBits *srcLine,
} }
} }
#ifdef FB_24BIT
#undef DEBUG_BLT24 #undef DEBUG_BLT24
#ifdef DEBUG_BLT24 #ifdef DEBUG_BLT24
@ -603,7 +600,6 @@ fbBlt24 (FbBits *srcLine,
ErrorF ("\n"); ErrorF ("\n");
#endif #endif
} }
#endif /* FB_24BIT */
#if FB_SHIFT == FB_STIP_SHIFT + 1 #if FB_SHIFT == FB_STIP_SHIFT + 1
@ -784,7 +780,6 @@ fbBltOdd (FbBits *srcLine,
} }
} }
#ifdef FB_24BIT
void void
fbBltOdd24 (FbBits *srcLine, fbBltOdd24 (FbBits *srcLine,
FbStride srcStrideEven, FbStride srcStrideEven,
@ -826,7 +821,6 @@ fbBltOdd24 (FbBits *srcLine,
} }
} }
} }
#endif
#endif #endif
@ -915,7 +909,6 @@ fbBltStip (FbStip *src,
&dstStrideEven, &dstStrideOdd, &dstStrideEven, &dstStrideOdd,
&dstXEven, &dstXOdd); &dstXEven, &dstXOdd);
#ifdef FB_24BIT
if (bpp == 24 && !FbCheck24Pix (pm)) if (bpp == 24 && !FbCheck24Pix (pm))
{ {
fbBltOdd24 (s, srcStrideEven, srcStrideOdd, fbBltOdd24 (s, srcStrideEven, srcStrideOdd,
@ -927,7 +920,6 @@ fbBltStip (FbStip *src,
width, height, alu, pm); width, height, alu, pm);
} }
else else
#endif
{ {
fbBltOdd (s, srcStrideEven, srcStrideOdd, fbBltOdd (s, srcStrideEven, srcStrideOdd,
srcXEven, srcXOdd, srcXEven, srcXOdd,

View File

@ -57,7 +57,6 @@
bits = (src < srcEnd ? READ(src++) : 0); \ bits = (src < srcEnd ? READ(src++) : 0); \
} }
#ifndef FBNOPIXADDR
#define LaneCases1(n,a) case n: FbLaneCase(n,a); break #define LaneCases1(n,a) case n: FbLaneCase(n,a); break
#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a) #define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a)
@ -128,7 +127,6 @@ CARD8 *fbLaneTable[33] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
fb32Lane fb32Lane
}; };
#endif
void void
fbBltOne (FbStip *src, fbBltOne (FbStip *src,
@ -164,12 +162,9 @@ fbBltOne (FbStip *src,
Bool transparent; /* accelerate 0 nop */ Bool transparent; /* accelerate 0 nop */
int srcinc; /* source units consumed */ int srcinc; /* source units consumed */
Bool endNeedsLoad = FALSE; /* need load for endmask */ Bool endNeedsLoad = FALSE; /* need load for endmask */
#ifndef FBNOPIXADDR
CARD8 *fbLane; CARD8 *fbLane;
#endif
int startbyte, endbyte; int startbyte, endbyte;
#ifdef FB_24BIT
if (dstBpp == 24) if (dstBpp == 24)
{ {
fbBltOne24 (src, srcStride, srcX, fbBltOne24 (src, srcStride, srcX,
@ -178,7 +173,6 @@ fbBltOne (FbStip *src,
fgand, fgxor, bgand, bgxor); fgand, fgxor, bgand, bgxor);
return; return;
} }
#endif
/* /*
* Do not read past the end of the buffer! * Do not read past the end of the buffer!
@ -238,11 +232,9 @@ fbBltOne (FbStip *src,
fbBits = 0; /* unused */ fbBits = 0; /* unused */
if (pixelsPerDst <= 8) if (pixelsPerDst <= 8)
fbBits = fbStippleTable[pixelsPerDst]; fbBits = fbStippleTable[pixelsPerDst];
#ifndef FBNOPIXADDR
fbLane = 0; fbLane = 0;
if (transparent && fgand == 0 && dstBpp >= 8) if (transparent && fgand == 0 && dstBpp >= 8)
fbLane = fbLaneTable[dstBpp]; fbLane = fbLaneTable[dstBpp];
#endif
/* /*
* Compute total number of destination words written, but * Compute total number of destination words written, but
@ -302,13 +294,11 @@ fbBltOne (FbStip *src,
else else
#endif #endif
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
#ifndef FBNOPIXADDR
if (fbLane) if (fbLane)
{ {
fbTransparentSpan (dst, mask & startmask, fgxor, 1); fbTransparentSpan (dst, mask & startmask, fgxor, 1);
} }
else else
#endif
{ {
if (mask || !transparent) if (mask || !transparent)
FbDoLeftMaskByteStippleRRop (dst, mask, FbDoLeftMaskByteStippleRRop (dst, mask,
@ -343,7 +333,6 @@ fbBltOne (FbStip *src,
} }
else else
{ {
#ifndef FBNOPIXADDR
if (fbLane) if (fbLane)
{ {
while (bits && n) while (bits && n)
@ -358,7 +347,6 @@ fbBltOne (FbStip *src,
dst += n; dst += n;
} }
else else
#endif
{ {
while (n--) while (n--)
{ {
@ -400,13 +388,11 @@ fbBltOne (FbStip *src,
else else
#endif #endif
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
#ifndef FBNOPIXADDR
if (fbLane) if (fbLane)
{ {
fbTransparentSpan (dst, mask & endmask, fgxor, 1); fbTransparentSpan (dst, mask & endmask, fgxor, 1);
} }
else else
#endif
{ {
if (mask || !transparent) if (mask || !transparent)
FbDoRightMaskByteStippleRRop (dst, mask, FbDoRightMaskByteStippleRRop (dst, mask,
@ -419,7 +405,6 @@ fbBltOne (FbStip *src,
} }
} }
#ifdef FB_24BIT
/* /*
* Crufty macros to initialize the mask array, most of this * Crufty macros to initialize the mask array, most of this
@ -747,7 +732,6 @@ fbBltOne24 (FbStip *srcLine,
} }
} }
} }
#endif
/* /*
* Not very efficient, but simple -- copy a single plane * Not very efficient, but simple -- copy a single plane
@ -801,7 +785,6 @@ fbBltPlane (FbBits *src,
w = width / srcBpp; w = width / srcBpp;
pm = fbReplicatePixel (planeMask, srcBpp); pm = fbReplicatePixel (planeMask, srcBpp);
#ifdef FB_24BIT
if (srcBpp == 24) if (srcBpp == 24)
{ {
int w = 24; int w = 24;
@ -812,7 +795,6 @@ fbBltPlane (FbBits *src,
srcMaskFirst = FbRot24(pm,rot0) & FbBitsMask(srcX,w); srcMaskFirst = FbRot24(pm,rot0) & FbBitsMask(srcX,w);
} }
else else
#endif
{ {
rot0 = 0; rot0 = 0;
srcMaskFirst = pm & FbBitsMask(srcX, srcBpp); srcMaskFirst = pm & FbBitsMask(srcX, srcBpp);
@ -828,10 +810,8 @@ fbBltPlane (FbBits *src,
src += srcStride; src += srcStride;
srcMask = srcMaskFirst; srcMask = srcMaskFirst;
#ifdef FB_24BIT
if (srcBpp == 24) if (srcBpp == 24)
srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp); srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
#endif
srcBits = READ(s++); srcBits = READ(s++);
dstMask = dstMaskFirst; dstMask = dstMaskFirst;
@ -845,10 +825,8 @@ fbBltPlane (FbBits *src,
if (!srcMask) if (!srcMask)
{ {
srcBits = READ(s++); srcBits = READ(s++);
#ifdef FB_24BIT
if (srcBpp == 24) if (srcBpp == 24)
srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24); srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
#endif
srcMask = srcMask0; srcMask = srcMask0;
} }
if (!dstMask) if (!dstMask)

View File

@ -335,11 +335,9 @@ fbCopyArea (DrawablePtr pSrcDrawable,
{ {
miCopyProc copy; miCopyProc copy;
#ifdef FB_24_32BIT
if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel)
copy = fb24_32CopyMtoN; copy = fb24_32CopyMtoN;
else else
#endif
copy = fbCopyNtoN; copy = fbCopyNtoN;
return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn, return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
widthSrc, heightSrc, xOut, yOut, copy, 0, 0); widthSrc, heightSrc, xOut, yOut, copy, 0, 0);

View File

@ -206,7 +206,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
miComputeCompositeClip (pGC, pDrawable); miComputeCompositeClip (pGC, pDrawable);
} }
#ifdef FB_24_32BIT
if (pPriv->bpp != pDrawable->bitsPerPixel) if (pPriv->bpp != pDrawable->bitsPerPixel)
{ {
changes |= GCStipple|GCForeground|GCBackground|GCPlaneMask; changes |= GCStipple|GCForeground|GCBackground|GCPlaneMask;
@ -240,7 +239,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
} }
} }
} }
#endif
if (changes & GCTile) if (changes & GCTile)
{ {
if (!pGC->tileIsPixel && if (!pGC->tileIsPixel &&

View File

@ -47,13 +47,11 @@ fbGetSpans(DrawablePtr pDrawable,
if (!fbDrawableEnabled(pDrawable)) if (!fbDrawableEnabled(pDrawable))
return; return;
#ifdef FB_24_32BIT
if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
{ {
fb24_32GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pchardstStart); fb24_32GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pchardstStart);
return; return;
} }
#endif
fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);

View File

@ -57,8 +57,6 @@ fbGlyphIn (RegionPtr pRegion,
return RegionContainsRect(pRegion, &box) == rgnIN; return RegionContainsRect(pRegion, &box) == rgnIN;
} }
#ifdef FB_24BIT
#ifndef FBNOPIXADDR
#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg) #define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg) #define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
@ -248,8 +246,6 @@ fbGlyph24 (FbBits *dstBits,
dstLine += dstStride; dstLine += dstStride;
} }
} }
#endif
#endif
void void
fbPolyGlyphBlt (DrawablePtr pDrawable, fbPolyGlyphBlt (DrawablePtr pDrawable,
@ -266,7 +262,6 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
int gx, gy; int gx, gy;
int gWidth, gHeight; /* width and height of glyph */ int gWidth, gHeight; /* width and height of glyph */
FbStride gStride; /* stride of glyph */ FbStride gStride; /* stride of glyph */
#ifndef FBNOPIXADDR
void (*glyph) (FbBits *, void (*glyph) (FbBits *,
FbStride, FbStride,
int, int,
@ -286,13 +281,10 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
case 16: glyph = fbGlyph16; break; case 16: glyph = fbGlyph16; break;
#ifdef FB_24BIT
case 24: glyph = fbGlyph24; break; case 24: glyph = fbGlyph24; break;
#endif
case 32: glyph = fbGlyph32; break; case 32: glyph = fbGlyph32; break;
} }
} }
#endif
x += pDrawable->x; x += pDrawable->x;
y += pDrawable->y; y += pDrawable->y;
@ -306,7 +298,6 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
{ {
gx = x + pci->metrics.leftSideBearing; gx = x + pci->metrics.leftSideBearing;
gy = y - pci->metrics.ascent; gy = y - pci->metrics.ascent;
#ifndef FBNOPIXADDR
if (glyph && gWidth <= sizeof (FbStip) * 8 && if (glyph && gWidth <= sizeof (FbStip) * 8 &&
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
{ {
@ -321,7 +312,6 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
fbFinishAccess (pDrawable); fbFinishAccess (pDrawable);
} }
else else
#endif
{ {
gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
fbPushImage (pDrawable, fbPushImage (pDrawable,
@ -359,7 +349,6 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
Bool opaque; Bool opaque;
int n; int n;
int gx, gy; int gx, gy;
#ifndef FBNOPIXADDR
void (*glyph) (FbBits *, void (*glyph) (FbBits *,
FbStride, FbStride,
int, int,
@ -379,21 +368,16 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
switch (dstBpp) { switch (dstBpp) {
case 8: glyph = fbGlyph8; break; case 8: glyph = fbGlyph8; break;
case 16: glyph = fbGlyph16; break; case 16: glyph = fbGlyph16; break;
#ifdef FB_24BIT
case 24: glyph = fbGlyph24; break; case 24: glyph = fbGlyph24; break;
#endif
case 32: glyph = fbGlyph32; break; case 32: glyph = fbGlyph32; break;
} }
} }
#endif
x += pDrawable->x; x += pDrawable->x;
y += pDrawable->y; y += pDrawable->y;
if (TERMINALFONT (pGC->font) if (TERMINALFONT (pGC->font)
#ifndef FBNOPIXADDR
&& !glyph && !glyph
#endif
) )
{ {
opaque = TRUE; opaque = TRUE;
@ -439,7 +423,6 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
{ {
gx = x + pci->metrics.leftSideBearing; gx = x + pci->metrics.leftSideBearing;
gy = y - pci->metrics.ascent; gy = y - pci->metrics.ascent;
#ifndef FBNOPIXADDR
if (glyph && gWidth <= sizeof (FbStip) * 8 && if (glyph && gWidth <= sizeof (FbStip) * 8 &&
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
{ {
@ -454,7 +437,6 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
fbFinishAccess (pDrawable); fbFinishAccess (pDrawable);
} }
else else
#endif
{ {
gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
fbPutXYImage (pDrawable, fbPutXYImage (pDrawable,

View File

@ -86,7 +86,6 @@ fbPutImage (DrawablePtr pDrawable,
} }
break; break;
case ZPixmap: case ZPixmap:
#ifdef FB_24_32BIT
if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
{ {
srcStride = PixmapBytePad(w, pDrawable->depth); srcStride = PixmapBytePad(w, pDrawable->depth);
@ -99,7 +98,6 @@ fbPutImage (DrawablePtr pDrawable,
srcStride); srcStride);
} }
else else
#endif
{ {
srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof (FbStip); srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof (FbStip);
fbPutZImage (pDrawable, fbPutZImage (pDrawable,
@ -305,14 +303,12 @@ fbGetImage (DrawablePtr pDrawable,
if (!fbDrawableEnabled(pDrawable)) if (!fbDrawableEnabled(pDrawable))
return; return;
#ifdef FB_24_32BIT
if (format == ZPixmap && if (format == ZPixmap &&
pDrawable->bitsPerPixel != BitsPerPixel (pDrawable->depth)) pDrawable->bitsPerPixel != BitsPerPixel (pDrawable->depth))
{ {
fb24_32GetImage (pDrawable, x, y, w, h, format, planeMask, d); fb24_32GetImage (pDrawable, x, y, w, h, format, planeMask, d);
return; return;
} }
#endif
fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);

View File

@ -114,7 +114,6 @@ fbPolyLine (DrawablePtr pDrawable,
if (pGC->lineWidth == 0) if (pGC->lineWidth == 0)
{ {
line = fbZeroLine; line = fbZeroLine;
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid && if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid && pGC->lineStyle == LineSolid &&
RegionNumRects (fbGetCompositeClip(pGC)) == 1) RegionNumRects (fbGetCompositeClip(pGC)) == 1)
@ -122,13 +121,10 @@ fbPolyLine (DrawablePtr pDrawable,
switch (pDrawable->bitsPerPixel) { switch (pDrawable->bitsPerPixel) {
case 8: line = fbPolyline8; break; case 8: line = fbPolyline8; break;
case 16: line = fbPolyline16; break; case 16: line = fbPolyline16; break;
#ifdef FB_24BIT
case 24: line = fbPolyline24; break; case 24: line = fbPolyline24; break;
#endif
case 32: line = fbPolyline32; break; case 32: line = fbPolyline32; break;
} }
} }
#endif
} }
else else
{ {
@ -151,7 +147,6 @@ fbPolySegment (DrawablePtr pDrawable,
if (pGC->lineWidth == 0) if (pGC->lineWidth == 0)
{ {
seg = fbZeroSegment; seg = fbZeroSegment;
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid && if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid && pGC->lineStyle == LineSolid &&
RegionNumRects (fbGetCompositeClip(pGC)) == 1) RegionNumRects (fbGetCompositeClip(pGC)) == 1)
@ -159,13 +154,10 @@ fbPolySegment (DrawablePtr pDrawable,
switch (pDrawable->bitsPerPixel) { switch (pDrawable->bitsPerPixel) {
case 8: seg = fbPolySegment8; break; case 8: seg = fbPolySegment8; break;
case 16: seg = fbPolySegment16; break; case 16: seg = fbPolySegment16; break;
#ifdef FB_24BIT
case 24: seg = fbPolySegment24; break; case 24: seg = fbPolySegment24; break;
#endif
case 32: seg = fbPolySegment32; break; case 32: seg = fbPolySegment32; break;
} }
} }
#endif
} }
else else
{ {

View File

@ -55,10 +55,8 @@ fbOverlayCreateWindow(WindowPtr pWin)
if (pWin->drawable.class != InputOutput) if (pWin->drawable.class != InputOutput)
return TRUE; return TRUE;
#ifdef FB_SCREEN_PRIVATE
if (pWin->drawable.bitsPerPixel == 32) if (pWin->drawable.bitsPerPixel == 32)
pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp;
#endif
for (i = 0; i < pScrPriv->nlayers; i++) for (i = 0; i < pScrPriv->nlayers; i++)
{ {
@ -349,7 +347,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
if (!pScrPriv) if (!pScrPriv)
return FALSE; return FALSE;
#ifdef FB_24_32BIT
if (bpp1 == 32 || bpp2 == 32) if (bpp1 == 32 || bpp2 == 32)
bpp = 32; bpp = 32;
else if (bpp1 == 24 || bpp2 == 24) else if (bpp1 == 24 || bpp2 == 24)
@ -374,8 +371,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
} }
} }
} }
#endif
#ifdef FB_SCREEN_PRIVATE
if (imagebpp == 32) if (imagebpp == 32)
{ {
fbGetScreenPrivate(pScreen)->win32bpp = bpp; fbGetScreenPrivate(pScreen)->win32bpp = bpp;
@ -386,7 +381,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
fbGetScreenPrivate(pScreen)->win32bpp = 32; fbGetScreenPrivate(pScreen)->win32bpp = 32;
fbGetScreenPrivate(pScreen)->pix32bpp = 32; fbGetScreenPrivate(pScreen)->pix32bpp = 32;
} }
#endif
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1, if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
&defaultVisual, ((unsigned long)1<<(bpp1-1)) | &defaultVisual, ((unsigned long)1<<(bpp1-1)) |
@ -421,13 +415,11 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
pScreen->CreateWindow = fbOverlayCreateWindow; pScreen->CreateWindow = fbOverlayCreateWindow;
pScreen->WindowExposures = fbOverlayWindowExposures; pScreen->WindowExposures = fbOverlayWindowExposures;
pScreen->CopyWindow = fbOverlayCopyWindow; pScreen->CopyWindow = fbOverlayCopyWindow;
#ifdef FB_24_32BIT
if (bpp == 24 && imagebpp == 32) if (bpp == 24 && imagebpp == 32)
{ {
pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources; pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources;
} }
#endif
return TRUE; return TRUE;
} }

View File

@ -89,10 +89,8 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
{ {
int bpp; int bpp;
bpp = BitsPerPixel (depth); bpp = BitsPerPixel (depth);
#ifdef FB_SCREEN_PRIVATE
if (bpp == 32 && depth <= 24) if (bpp == 32 && depth <= 24)
bpp = fbGetScreenPrivate(pScreen)->pix32bpp; bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
#endif
return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint); return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
} }

View File

@ -75,7 +75,6 @@ fbDots (FbBits *dstOrig,
x = (x + xoff) * dstBpp; x = (x + xoff) * dstBpp;
d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT); d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT);
x &= FB_STIP_MASK; x &= FB_STIP_MASK;
#ifdef FB_24BIT
if (dstBpp == 24) if (dstBpp == 24)
{ {
FbStip leftMask, rightMask; FbStip leftMask, rightMask;
@ -97,7 +96,6 @@ fbDots (FbBits *dstOrig,
WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask)); WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
} }
else else
#endif
{ {
FbStip mask; FbStip mask;
mask = FbStipMask(x, dstBpp); mask = FbStipMask(x, dstBpp);
@ -144,16 +142,12 @@ fbPolyPoint (DrawablePtr pDrawable,
and = pPriv->and; and = pPriv->and;
xor = pPriv->xor; xor = pPriv->xor;
dots = fbDots; dots = fbDots;
#ifndef FBNOPIXADDR
switch (dstBpp) { switch (dstBpp) {
case 8: dots = fbDots8; break; case 8: dots = fbDots8; break;
case 16: dots = fbDots16; break; case 16: dots = fbDots16; break;
#ifdef FB_24BIT
case 24: dots = fbDots24; break; case 24: dots = fbDots24; break;
#endif
case 32: dots = fbDots32; break; case 32: dots = fbDots32; break;
} }
#endif
for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip); for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip);
nBox--; pBox++) nBox--; pBox++)
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,

View File

@ -185,7 +185,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
* pixels. If you want real 24bit images, include a 24bpp * pixels. If you want real 24bit images, include a 24bpp
* format in the pixmap formats * format in the pixmap formats
*/ */
#ifdef FB_24_32BIT
if (bpp == 24) if (bpp == 24)
{ {
int f; int f;
@ -205,8 +204,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
} }
} }
} }
#endif
#ifdef FB_SCREEN_PRIVATE
if (imagebpp == 32) if (imagebpp == 32)
{ {
fbGetScreenPrivate(pScreen)->win32bpp = bpp; fbGetScreenPrivate(pScreen)->win32bpp = bpp;
@ -220,7 +217,6 @@ fbFinishScreenInit(ScreenPtr pScreen,
#ifdef FB_ACCESS_WRAPPER #ifdef FB_ACCESS_WRAPPER
fbGetScreenPrivate(pScreen)->setupWrap = setupWrap; fbGetScreenPrivate(pScreen)->setupWrap = setupWrap;
fbGetScreenPrivate(pScreen)->finishWrap = finishWrap; fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
#endif
#endif #endif
rootdepth = 0; rootdepth = 0;
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
@ -236,13 +232,11 @@ fbFinishScreenInit(ScreenPtr pScreen,
return FALSE; return FALSE;
/* overwrite miCloseScreen with our own */ /* overwrite miCloseScreen with our own */
pScreen->CloseScreen = fbCloseScreen; pScreen->CloseScreen = fbCloseScreen;
#ifdef FB_24_32BIT
if (bpp == 24 && imagebpp == 32) if (bpp == 24 && imagebpp == 32)
{ {
pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
pScreen->CreateScreenResources = fb24_32CreateScreenResources; pScreen->CreateScreenResources = fb24_32CreateScreenResources;
} }
#endif
return TRUE; return TRUE;
} }

View File

@ -330,7 +330,6 @@ fbBresFillDash (DrawablePtr pDrawable,
fbSetFg (pDrawable, pGC, fg); fbSetFg (pDrawable, pGC, fg);
} }
#ifdef FB_24BIT
static void static void
fbBresSolid24RRop (DrawablePtr pDrawable, fbBresSolid24RRop (DrawablePtr pDrawable,
GCPtr pGC, GCPtr pGC,
@ -507,7 +506,6 @@ fbBresDash24RRop (DrawablePtr pDrawable,
fbFinishAccess (pDrawable); fbFinishAccess (pDrawable);
} }
#endif
/* /*
* For drivers that want to bail drawing some lines, this * For drivers that want to bail drawing some lines, this
@ -529,23 +527,17 @@ fbSelectBres (DrawablePtr pDrawable,
if (pGC->fillStyle == FillSolid) if (pGC->fillStyle == FillSolid)
{ {
bres = fbBresSolid; bres = fbBresSolid;
#ifdef FB_24BIT
if (dstBpp == 24) if (dstBpp == 24)
bres = fbBresSolid24RRop; bres = fbBresSolid24RRop;
#endif
#ifndef FBNOPIXADDR
if (pPriv->and == 0) if (pPriv->and == 0)
{ {
switch (dstBpp) { switch (dstBpp) {
case 8: bres = fbBresSolid8; break; case 8: bres = fbBresSolid8; break;
case 16: bres = fbBresSolid16; break; case 16: bres = fbBresSolid16; break;
#ifdef FB_24BIT
case 24: bres = fbBresSolid24; break; case 24: bres = fbBresSolid24; break;
#endif
case 32: bres = fbBresSolid32; break; case 32: bres = fbBresSolid32; break;
} }
} }
#endif
} }
} }
else else
@ -554,24 +546,18 @@ fbSelectBres (DrawablePtr pDrawable,
if (pGC->fillStyle == FillSolid) if (pGC->fillStyle == FillSolid)
{ {
bres = fbBresDash; bres = fbBresDash;
#ifdef FB_24BIT
if (dstBpp == 24) if (dstBpp == 24)
bres = fbBresDash24RRop; bres = fbBresDash24RRop;
#endif
#ifndef FBNOPIXADDR
if (pPriv->and == 0 && if (pPriv->and == 0 &&
(pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0)) (pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0))
{ {
switch (dstBpp) { switch (dstBpp) {
case 8: bres = fbBresDash8; break; case 8: bres = fbBresDash8; break;
case 16: bres = fbBresDash16; break; case 16: bres = fbBresDash16; break;
#ifdef FB_24BIT
case 24: bres = fbBresDash24; break; case 24: bres = fbBresDash24; break;
#endif
case 32: bres = fbBresDash32; break; case 32: bres = fbBresDash32; break;
} }
} }
#endif
} }
} }
return bres; return bres;

View File

@ -46,13 +46,11 @@ fbSetSpans (DrawablePtr pDrawable,
int xoff; int xoff;
int x1, x2; int x1, x2;
#ifdef FB_24_32BIT
if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
{ {
fb24_32SetSpans (pDrawable, pGC, src, ppt, pwidth, nspans, fSorted); fb24_32SetSpans (pDrawable, pGC, src, ppt, pwidth, nspans, fSorted);
return; return;
} }
#endif
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
while (nspans--) while (nspans--)
{ {

View File

@ -44,13 +44,11 @@ fbSolid (FbBits *dst,
int n, nmiddle; int n, nmiddle;
int startbyte, endbyte; int startbyte, endbyte;
#ifdef FB_24BIT
if (bpp == 24 && (!FbCheck24Pix(and) || !FbCheck24Pix(xor))) if (bpp == 24 && (!FbCheck24Pix(and) || !FbCheck24Pix(xor)))
{ {
fbSolid24 (dst, dstStride, dstX, width, height, and, xor); fbSolid24 (dst, dstStride, dstX, width, height, and, xor);
return; return;
} }
#endif
dst += dstX >> FB_SHIFT; dst += dstX >> FB_SHIFT;
dstX &= FB_MASK; dstX &= FB_MASK;
FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte, FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte,
@ -81,7 +79,6 @@ fbSolid (FbBits *dst,
} }
} }
#ifdef FB_24BIT
void void
fbSolid24 (FbBits *dst, fbSolid24 (FbBits *dst,
FbStride dstStride, FbStride dstStride,
@ -210,4 +207,3 @@ fbSolid24 (FbBits *dst,
dst += dstStride; dst += dstStride;
} }
} }
#endif

View File

@ -26,7 +26,6 @@
#include "fb.h" #include "fb.h"
#ifndef FBNOPIXADDR
/* /*
* This is a slight abuse of the preprocessor to generate repetitive * This is a slight abuse of the preprocessor to generate repetitive
* code, the idea is to generate code for each case of a copy-mode * code, the idea is to generate code for each case of a copy-mode
@ -78,7 +77,6 @@ fbTransparentSpan (FbBits *dst,
LaneCases(dst); LaneCases(dst);
} }
} }
#endif
void void
fbEvenStipple (FbBits *dst, fbEvenStipple (FbBits *dst,
@ -170,7 +168,6 @@ fbEvenStipple (FbBits *dst,
and = (fgand & mask) | (bgand & ~mask); and = (fgand & mask) | (bgand & ~mask);
xor = (fgxor & mask) | (bgxor & ~mask); xor = (fgxor & mask) | (bgxor & ~mask);
#ifndef FBNOPIXADDR
if (transparent) if (transparent)
{ {
if (startmask) if (startmask)
@ -184,7 +181,6 @@ fbEvenStipple (FbBits *dst,
fbTransparentSpan(dst, mask&endmask, fgxor, 1); fbTransparentSpan(dst, mask&endmask, fgxor, 1);
} }
else else
#endif
{ {
/* /*
* Fill scanline * Fill scanline

View File

@ -33,10 +33,8 @@ fbCreateWindow(WindowPtr pWin)
{ {
dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(),
fbGetScreenPixmap(pWin->drawable.pScreen)); fbGetScreenPixmap(pWin->drawable.pScreen));
#ifdef FB_SCREEN_PRIVATE
if (pWin->drawable.bitsPerPixel == 32) if (pWin->drawable.bitsPerPixel == 32)
pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp;
#endif
return TRUE; return TRUE;
} }
@ -158,7 +156,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
if (pWin->backgroundState == BackgroundPixmap) if (pWin->backgroundState == BackgroundPixmap)
{ {
pPixmap = pWin->background.pixmap; pPixmap = pWin->background.pixmap;
#ifdef FB_24_32BIT
if (pPixmap->drawable.bitsPerPixel != pWin->drawable.bitsPerPixel) if (pPixmap->drawable.bitsPerPixel != pWin->drawable.bitsPerPixel)
{ {
pPixmap = fb24_32ReformatTile (pPixmap, pPixmap = fb24_32ReformatTile (pPixmap,
@ -169,7 +166,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
pWin->background.pixmap = pPixmap; pWin->background.pixmap = pPixmap;
} }
} }
#endif
if (FbEvenTile (pPixmap->drawable.width * if (FbEvenTile (pPixmap->drawable.width *
pPixmap->drawable.bitsPerPixel)) pPixmap->drawable.bitsPerPixel))
fbPadPixmap (pPixmap); fbPadPixmap (pPixmap);
@ -180,7 +176,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
if (pWin->borderIsPixel == FALSE) if (pWin->borderIsPixel == FALSE)
{ {
pPixmap = pWin->border.pixmap; pPixmap = pWin->border.pixmap;
#ifdef FB_24_32BIT
if (pPixmap->drawable.bitsPerPixel != if (pPixmap->drawable.bitsPerPixel !=
pWin->drawable.bitsPerPixel) pWin->drawable.bitsPerPixel)
{ {
@ -192,7 +187,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
pWin->border.pixmap = pPixmap; pWin->border.pixmap = pPixmap;
} }
} }
#endif
if (FbEvenTile (pPixmap->drawable.width * if (FbEvenTile (pPixmap->drawable.width *
pPixmap->drawable.bitsPerPixel)) pPixmap->drawable.bitsPerPixel))
fbPadPixmap (pPixmap); fbPadPixmap (pPixmap);