[PATCH 1/2] fb: drop defines that aren't used/necessary anymore.

Dave Airlie airlied at gmail.com
Mon Mar 28 21:26:43 PDT 2011


From: Dave Airlie <airlied at redhat.com>

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 at redhat.com>
---
 fb/fb.h        |   27 ---------------------------
 fb/fballpriv.c |    4 ----
 fb/fbarc.c     |    4 ----
 fb/fbbits.c    |    2 --
 fb/fbblt.c     |    8 --------
 fb/fbbltone.c  |   22 ----------------------
 fb/fbcopy.c    |    2 --
 fb/fbgc.c      |    2 --
 fb/fbgetsp.c   |    2 --
 fb/fbglyph.c   |   18 ------------------
 fb/fbimage.c   |    4 ----
 fb/fbline.c    |    8 --------
 fb/fboverlay.c |    8 --------
 fb/fbpixmap.c  |    2 --
 fb/fbpoint.c   |    6 ------
 fb/fbscreen.c  |    6 ------
 fb/fbseg.c     |   14 --------------
 fb/fbsetsp.c   |    2 --
 fb/fbsolid.c   |    4 ----
 fb/fbstipple.c |    4 ----
 fb/fbwindow.c  |    6 ------
 21 files changed, 0 insertions(+), 155 deletions(-)

diff --git a/fb/fb.h b/fb/fb.h
index 021a940..e73de3c 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -98,20 +98,12 @@
 #error "GLYPHPADBYTES must be 4"
 #endif
 /* whether to bother to include 24bpp support */
-#ifndef FBNO24BIT
-#define FB_24BIT
-#endif
 
 /*
  * Unless otherwise instructed, fb includes code to advertise 24bpp
  * 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_UNIT	(1 << FB_STIP_SHIFT)
@@ -234,15 +226,6 @@ extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
     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
 
@@ -454,7 +437,6 @@ extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
 	WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
     } \
 }
-#endif
 
 #define FbMaskStip(x,w,l,n,r) { \
     n = (w); \
@@ -612,9 +594,6 @@ fbGetWinPrivateKey (void);
 extern _X_EXPORT const GCOps	fbGCOps;
 extern _X_EXPORT const GCFuncs	fbGCFuncs;
 
-#ifdef FB_24_32BIT
-#define FB_SCREEN_PRIVATE
-#endif
 
 /* Framebuffer access wrapper */
 typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
@@ -642,7 +621,6 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
 #endif
 
 
-#ifdef FB_SCREEN_PRIVATE
 extern _X_EXPORT DevPrivateKey
 fbGetScreenPrivateKey(void);
 
@@ -658,7 +636,6 @@ typedef struct {
 
 #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
 				     dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
-#endif
 
 /* private field of GC */
 typedef struct {
@@ -1223,7 +1200,6 @@ fbBltOne (FbStip   *src,
 	  FbBits   bgand,
 	  FbBits   bgxor);
  
-#ifdef FB_24BIT
 extern _X_EXPORT void
 fbBltOne24 (FbStip    *src,
 	  FbStride  srcStride,	    /* FbStip units per scanline */
@@ -1240,7 +1216,6 @@ fbBltOne24 (FbStip    *src,
 	  FbBits    fgxor,
 	  FbBits    bgand,
 	  FbBits    bgxor);
-#endif
 
 extern _X_EXPORT void
 fbBltPlane (FbBits	    *src,
@@ -1868,7 +1843,6 @@ fbSolid (FbBits	    *dst,
 	 FbBits	    and,
 	 FbBits	    xor);
 
-#ifdef FB_24BIT
 extern _X_EXPORT void
 fbSolid24 (FbBits   *dst,
 	   FbStride dstStride,
@@ -1879,7 +1853,6 @@ fbSolid24 (FbBits   *dst,
 
 	   FbBits   and,
 	   FbBits   xor);
-#endif
 
 /*
  * fbstipple.c
diff --git a/fb/fballpriv.c b/fb/fballpriv.c
index efeb268..3219036 100644
--- a/fb/fballpriv.c
+++ b/fb/fballpriv.c
@@ -26,11 +26,9 @@
 
 #include "fb.h"
 
-#ifdef FB_SCREEN_PRIVATE
 static DevPrivateKeyRec fbScreenPrivateKeyRec;
 DevPrivateKey
 fbGetScreenPrivateKey(void) { return &fbScreenPrivateKeyRec; }
-#endif
 
 static DevPrivateKeyRec fbGCPrivateKeyRec;
 DevPrivateKey
@@ -48,10 +46,8 @@ fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey)
     
     if (!dixRegisterPrivateKey(&fbGCPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec)))
 	return FALSE;
-#ifdef FB_SCREEN_PRIVATE
     if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof (FbScreenPrivRec)))
 	return FALSE;
-#endif
     if (!dixRegisterPrivateKey(&fbWinPrivateKeyRec, PRIVATE_WINDOW, 0))
 	return FALSE;
 
diff --git a/fb/fbarc.c b/fb/fbarc.c
index 33e44b0..a0c5343 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -47,7 +47,6 @@ fbPolyArc (DrawablePtr	pDrawable,
     
     if (pGC->lineWidth == 0)
     {
-#ifndef FBNOPIXADDR
 	arc = 0;
 	if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid)
 	{
@@ -55,9 +54,7 @@ fbPolyArc (DrawablePtr	pDrawable,
 	    {
 	    case 8:	arc = fbArc8; break;
 	    case 16:    arc = fbArc16; break;
-#ifdef FB_24BIT
 	    case 24:	arc = fbArc24; break;
-#endif
 	    case 32:    arc = fbArc32; break;
 	    }
 	}
@@ -141,7 +138,6 @@ fbPolyArc (DrawablePtr	pDrawable,
 #endif
 	}
 	else
-#endif
 	    miZeroPolyArc (pDrawable, pGC, narcs, parcs);
     }
     else
diff --git a/fb/fbbits.c b/fb/fbbits.c
index 8083743..850d163 100644
--- a/fb/fbbits.c
+++ b/fb/fbbits.c
@@ -89,7 +89,6 @@
 #undef BITS4
 #endif
 
-#ifdef FB_24BIT
 #define BRESSOLID   fbBresSolid24
 #define BRESDASH    fbBresDash24
 #define DOTS        fbDots24
@@ -147,7 +146,6 @@
 #undef ARC
 #undef POLYLINE
 #undef POLYSEGMENT
-#endif /* FB_24BIT */
 
 #define BRESSOLID   fbBresSolid32
 #define BRESDASH    fbBresDash32
diff --git a/fb/fbblt.c b/fb/fbblt.c
index 38271c0..a040298 100644
--- a/fb/fbblt.c
+++ b/fb/fbblt.c
@@ -67,14 +67,12 @@ fbBlt (FbBits   *srcLine,
     int	    startbyte, endbyte;
     FbDeclareMergeRop ();
 
-#ifdef FB_24BIT
     if (bpp == 24 && !FbCheck24Pix (pm))
     {
 	fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
 		 width, height, alu, pm, reverse, upsidedown);
 	return;
     }
-#endif
 
     if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
             !(srcX & 7) && !(dstX & 7) && !(width & 7)) {
@@ -338,7 +336,6 @@ fbBlt (FbBits   *srcLine,
     }
 }
 
-#ifdef FB_24BIT
 
 #undef DEBUG_BLT24
 #ifdef DEBUG_BLT24
@@ -603,7 +600,6 @@ fbBlt24 (FbBits	    *srcLine,
     ErrorF ("\n");
 #endif
 }
-#endif /* FB_24BIT */
 
 #if FB_SHIFT == FB_STIP_SHIFT + 1
 
@@ -784,7 +780,6 @@ fbBltOdd (FbBits    *srcLine,
     }
 }
 
-#ifdef FB_24BIT
 void
 fbBltOdd24 (FbBits	*srcLine,
 	    FbStride	srcStrideEven,
@@ -826,7 +821,6 @@ fbBltOdd24 (FbBits	*srcLine,
 	}
     }
 }
-#endif
 
 #endif
 
@@ -915,7 +909,6 @@ fbBltStip (FbStip   *src,
 		     &dstStrideEven, &dstStrideOdd,
 		     &dstXEven, &dstXOdd);
 		     
-#ifdef FB_24BIT
 	if (bpp == 24 && !FbCheck24Pix (pm))
 	{
 	    fbBltOdd24  (s, srcStrideEven, srcStrideOdd,
@@ -927,7 +920,6 @@ fbBltStip (FbStip   *src,
 			 width, height, alu, pm);
 	}
 	else
-#endif
 	{
 	    fbBltOdd (s, srcStrideEven, srcStrideOdd,
 		      srcXEven, srcXOdd,
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index 5d5d2e6..629b13a 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -57,7 +57,6 @@
 	bits = (src < srcEnd ? READ(src++) : 0); \
 }
     
-#ifndef FBNOPIXADDR
     
 #define LaneCases1(n,a)	    case n: FbLaneCase(n,a); break
 #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,
     fb32Lane
 };
-#endif
 
 void
 fbBltOne (FbStip    *src,
@@ -164,12 +162,9 @@ fbBltOne (FbStip    *src,
     Bool	    transparent;		/* accelerate 0 nop */
     int		    srcinc;			/* source units consumed */
     Bool	    endNeedsLoad = FALSE;	/* need load for endmask */
-#ifndef FBNOPIXADDR
     CARD8	    *fbLane;
-#endif
     int		    startbyte, endbyte;
 
-#ifdef FB_24BIT
     if (dstBpp == 24)
     {
 	fbBltOne24 (src, srcStride, srcX,
@@ -178,7 +173,6 @@ fbBltOne (FbStip    *src,
 		    fgand, fgxor, bgand, bgxor);
 	return;
     }
-#endif
 
     /*
      * Do not read past the end of the buffer!
@@ -238,11 +232,9 @@ fbBltOne (FbStip    *src,
     fbBits = 0;	/* unused */
     if (pixelsPerDst <= 8)
 	fbBits = fbStippleTable[pixelsPerDst];
-#ifndef FBNOPIXADDR
     fbLane = 0;
     if (transparent && fgand == 0 && dstBpp >= 8)
 	fbLane = fbLaneTable[dstBpp];
-#endif
     
     /*
      * Compute total number of destination words written, but 
@@ -302,13 +294,11 @@ fbBltOne (FbStip    *src,
 		else
 #endif
 		    mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
-#ifndef FBNOPIXADDR		
 		if (fbLane)
 		{
 		    fbTransparentSpan (dst, mask & startmask, fgxor, 1);
 		}
 		else
-#endif
 		{
 		    if (mask || !transparent)
 			FbDoLeftMaskByteStippleRRop (dst, mask,
@@ -343,7 +333,6 @@ fbBltOne (FbStip    *src,
 		}
 		else
 		{
-#ifndef FBNOPIXADDR
 		    if (fbLane)
 		    {
 			while (bits && n)
@@ -358,7 +347,6 @@ fbBltOne (FbStip    *src,
 			dst += n;
 		    }
 		    else
-#endif
 		    {
 			while (n--)
 			{
@@ -400,13 +388,11 @@ fbBltOne (FbStip    *src,
 	    else
 #endif
 		mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
-#ifndef FBNOPIXADDR
 	    if (fbLane)
 	    {
 		fbTransparentSpan (dst, mask & endmask, fgxor, 1);
 	    }
 	    else
-#endif
 	    {
 		if (mask || !transparent)
 		    FbDoRightMaskByteStippleRRop (dst, mask, 
@@ -419,7 +405,6 @@ fbBltOne (FbStip    *src,
     }
 }
 
-#ifdef FB_24BIT
 
 /*
  * 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
@@ -801,7 +785,6 @@ fbBltPlane (FbBits	    *src,
     w = width / srcBpp;
 
     pm = fbReplicatePixel (planeMask, srcBpp);
-#ifdef FB_24BIT
     if (srcBpp == 24)
     {
 	int w = 24;
@@ -812,7 +795,6 @@ fbBltPlane (FbBits	    *src,
 	srcMaskFirst = FbRot24(pm,rot0) & FbBitsMask(srcX,w);
     }
     else
-#endif
     {
 	rot0 = 0;
 	srcMaskFirst = pm & FbBitsMask(srcX, srcBpp);
@@ -828,10 +810,8 @@ fbBltPlane (FbBits	    *src,
 	src += srcStride;
 	
 	srcMask = srcMaskFirst;
-#ifdef FB_24BIT
 	if (srcBpp == 24)
 	    srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
-#endif
     	srcBits = READ(s++);
 
 	dstMask = dstMaskFirst;
@@ -845,10 +825,8 @@ fbBltPlane (FbBits	    *src,
 	    if (!srcMask)
 	    {
 		srcBits = READ(s++);
-#ifdef FB_24BIT
 		if (srcBpp == 24)
 		    srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
-#endif
 		srcMask = srcMask0;
 	    }
 	    if (!dstMask)
diff --git a/fb/fbcopy.c b/fb/fbcopy.c
index 9a7c49a..8983203 100644
--- a/fb/fbcopy.c
+++ b/fb/fbcopy.c
@@ -335,11 +335,9 @@ fbCopyArea (DrawablePtr	pSrcDrawable,
 {
     miCopyProc	copy;
 
-#ifdef FB_24_32BIT
     if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel)
 	copy = fb24_32CopyMtoN;
     else
-#endif
 	copy = fbCopyNtoN;
     return miDoCopy (pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
 		     widthSrc, heightSrc, xOut, yOut, copy, 0, 0);
diff --git a/fb/fbgc.c b/fb/fbgc.c
index b27a030..cc504c1 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -206,7 +206,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 	miComputeCompositeClip (pGC, pDrawable);
     }
     
-#ifdef FB_24_32BIT    
     if (pPriv->bpp != pDrawable->bitsPerPixel)
     {
 	changes |= GCStipple|GCForeground|GCBackground|GCPlaneMask;
@@ -240,7 +239,6 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 	    }
 	}
     }
-#endif
     if (changes & GCTile)
     {
 	if (!pGC->tileIsPixel && 
diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c
index 6402c6c..bf9f51e 100644
--- a/fb/fbgetsp.c
+++ b/fb/fbgetsp.c
@@ -47,13 +47,11 @@ fbGetSpans(DrawablePtr	pDrawable,
     if (!fbDrawableEnabled(pDrawable))
 	return;
     
-#ifdef FB_24_32BIT
     if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
     {
 	fb24_32GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pchardstStart);
 	return;
     }
-#endif
     
     fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
     
diff --git a/fb/fbglyph.c b/fb/fbglyph.c
index 8208081..643cf90 100644
--- a/fb/fbglyph.c
+++ b/fb/fbglyph.c
@@ -57,8 +57,6 @@ fbGlyphIn (RegionPtr	pRegion,
     return RegionContainsRect(pRegion, &box) == rgnIN;
 }
 
-#ifdef FB_24BIT
-#ifndef FBNOPIXADDR
 
 #define WRITE1(d,n,fg)	WRITE((d) + (n), (CARD8) fg)
 #define WRITE2(d,n,fg)	WRITE((CARD16 *) &(d[n]), (CARD16) fg)
@@ -248,8 +246,6 @@ fbGlyph24 (FbBits   *dstBits,
 	dstLine += dstStride;
     }
 }
-#endif
-#endif
 
 void
 fbPolyGlyphBlt (DrawablePtr	pDrawable,
@@ -266,7 +262,6 @@ fbPolyGlyphBlt (DrawablePtr	pDrawable,
     int		    gx, gy;
     int		    gWidth, gHeight;	/* width and height of glyph */
     FbStride	    gStride;		/* stride of glyph */
-#ifndef FBNOPIXADDR
     void	    (*glyph) (FbBits *,
 			      FbStride,
 			      int,
@@ -286,13 +281,10 @@ fbPolyGlyphBlt (DrawablePtr	pDrawable,
 	switch (dstBpp) {
 	case 8:	    glyph = fbGlyph8; break;
 	case 16:    glyph = fbGlyph16; break;
-#ifdef FB_24BIT
 	case 24:    glyph = fbGlyph24; break;
-#endif
 	case 32:    glyph = fbGlyph32; break;
 	}
     }
-#endif
     x += pDrawable->x;
     y += pDrawable->y;
 
@@ -306,7 +298,6 @@ fbPolyGlyphBlt (DrawablePtr	pDrawable,
 	{
 	    gx = x + pci->metrics.leftSideBearing;
 	    gy = y - pci->metrics.ascent; 
-#ifndef FBNOPIXADDR
 	    if (glyph && gWidth <= sizeof (FbStip) * 8 &&
 		fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
 	    {
@@ -321,7 +312,6 @@ fbPolyGlyphBlt (DrawablePtr	pDrawable,
 		fbFinishAccess (pDrawable);
 	    }
 	    else
-#endif
 	    {
 		gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
 		fbPushImage (pDrawable,
@@ -359,7 +349,6 @@ fbImageGlyphBlt (DrawablePtr	pDrawable,
     Bool	    opaque;
     int		    n;
     int		    gx, gy;
-#ifndef FBNOPIXADDR
     void	    (*glyph) (FbBits *,
 			      FbStride,
 			      int,
@@ -379,21 +368,16 @@ fbImageGlyphBlt (DrawablePtr	pDrawable,
 	switch (dstBpp) {
 	case 8:	    glyph = fbGlyph8; break;
 	case 16:    glyph = fbGlyph16; break;
-#ifdef FB_24BIT
 	case 24:    glyph = fbGlyph24; break;
-#endif
 	case 32:    glyph = fbGlyph32; break;
 	}
     }
-#endif
     
     x += pDrawable->x;
     y += pDrawable->y;
 
     if (TERMINALFONT (pGC->font)
-#ifndef FBNOPIXADDR
 	&& !glyph
-#endif
 	)
     {
 	opaque = TRUE;
@@ -439,7 +423,6 @@ fbImageGlyphBlt (DrawablePtr	pDrawable,
 	{
 	    gx = x + pci->metrics.leftSideBearing;
 	    gy = y - pci->metrics.ascent; 
-#ifndef FBNOPIXADDR
 	    if (glyph && gWidth <= sizeof (FbStip) * 8 &&
 		fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
 	    {
@@ -454,7 +437,6 @@ fbImageGlyphBlt (DrawablePtr	pDrawable,
 		fbFinishAccess (pDrawable);
 	    }
 	    else
-#endif
 	    {
 		gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
 		fbPutXYImage (pDrawable,
diff --git a/fb/fbimage.c b/fb/fbimage.c
index da1e8bc..63978cc 100644
--- a/fb/fbimage.c
+++ b/fb/fbimage.c
@@ -86,7 +86,6 @@ fbPutImage (DrawablePtr	pDrawable,
 	}
 	break;
     case ZPixmap:
-#ifdef FB_24_32BIT
 	if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
 	{
 	    srcStride = PixmapBytePad(w, pDrawable->depth);
@@ -99,7 +98,6 @@ fbPutImage (DrawablePtr	pDrawable,
 			      srcStride);
 	}
 	else
-#endif
 	{
 	    srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof (FbStip);
 	    fbPutZImage (pDrawable,
@@ -305,14 +303,12 @@ fbGetImage (DrawablePtr	    pDrawable,
     if (!fbDrawableEnabled(pDrawable))
 	return;
     
-#ifdef FB_24_32BIT
     if (format == ZPixmap &&
 	pDrawable->bitsPerPixel != BitsPerPixel (pDrawable->depth))
     {
 	fb24_32GetImage (pDrawable, x, y, w, h, format, planeMask, d);
 	return;
     }
-#endif
     
     fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
     
diff --git a/fb/fbline.c b/fb/fbline.c
index fa80573..e290bf8 100644
--- a/fb/fbline.c
+++ b/fb/fbline.c
@@ -114,7 +114,6 @@ fbPolyLine (DrawablePtr	pDrawable,
     if (pGC->lineWidth == 0)
     {
 	line = fbZeroLine;
-#ifndef FBNOPIXADDR
 	if (pGC->fillStyle == FillSolid &&
 	    pGC->lineStyle == LineSolid &&
 	    RegionNumRects (fbGetCompositeClip(pGC)) == 1)
@@ -122,13 +121,10 @@ fbPolyLine (DrawablePtr	pDrawable,
 	    switch (pDrawable->bitsPerPixel) {
 	    case 8:  line = fbPolyline8; break;
 	    case 16: line = fbPolyline16; break;
-#ifdef FB_24BIT
 	    case 24: line = fbPolyline24; break;
-#endif
 	    case 32: line = fbPolyline32; break;
 	    }
 	}
-#endif
     }
     else
     {
@@ -151,7 +147,6 @@ fbPolySegment (DrawablePtr  pDrawable,
     if (pGC->lineWidth == 0)
     {
 	seg = fbZeroSegment;
-#ifndef FBNOPIXADDR
 	if (pGC->fillStyle == FillSolid &&
 	    pGC->lineStyle == LineSolid &&
 	    RegionNumRects (fbGetCompositeClip(pGC)) == 1)
@@ -159,13 +154,10 @@ fbPolySegment (DrawablePtr  pDrawable,
 	    switch (pDrawable->bitsPerPixel) {
 	    case 8:  seg = fbPolySegment8; break;
 	    case 16: seg = fbPolySegment16; break;
-#ifdef FB_24BIT
 	    case 24: seg = fbPolySegment24; break;
-#endif
 	    case 32: seg = fbPolySegment32; break;
 	    }
 	}
-#endif
     }
     else
     {
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 7fca89c..61eaaa3 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -55,10 +55,8 @@ fbOverlayCreateWindow(WindowPtr pWin)
     if (pWin->drawable.class != InputOutput)
 	return TRUE;
 
-#ifdef FB_SCREEN_PRIVATE
     if (pWin->drawable.bitsPerPixel == 32)
 	pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp;
-#endif
 
     for (i = 0; i < pScrPriv->nlayers; i++)
     {
@@ -349,7 +347,6 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
     if (!pScrPriv)
 	return FALSE;
  
-#ifdef FB_24_32BIT
     if (bpp1 == 32 || bpp2 == 32)
 	bpp = 32;
     else if (bpp1 == 24 || bpp2 == 24)
@@ -374,8 +371,6 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
 	    }
 	}	    
     }
-#endif
-#ifdef FB_SCREEN_PRIVATE
     if (imagebpp == 32)
     {
 	fbGetScreenPrivate(pScreen)->win32bpp = bpp;
@@ -386,7 +381,6 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
 	fbGetScreenPrivate(pScreen)->win32bpp = 32;
 	fbGetScreenPrivate(pScreen)->pix32bpp = 32;
     }
-#endif
    
     if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1,
 			&defaultVisual, ((unsigned long)1<<(bpp1-1)) |
@@ -421,13 +415,11 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
     pScreen->CreateWindow = fbOverlayCreateWindow;
     pScreen->WindowExposures = fbOverlayWindowExposures;
     pScreen->CopyWindow = fbOverlayCopyWindow;
-#ifdef FB_24_32BIT
     if (bpp == 24 && imagebpp == 32)
     {
 	pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
   	pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources;
     }
-#endif
 
     return TRUE;
 }
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index 41b12ce..a356c67 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -89,10 +89,8 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
 {
     int	bpp;
     bpp = BitsPerPixel (depth);
-#ifdef FB_SCREEN_PRIVATE
     if (bpp == 32 && depth <= 24)
 	bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
-#endif
     return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
 }
 
diff --git a/fb/fbpoint.c b/fb/fbpoint.c
index f260a69..bf61770 100644
--- a/fb/fbpoint.c
+++ b/fb/fbpoint.c
@@ -75,7 +75,6 @@ fbDots (FbBits	    *dstOrig,
 	    x = (x + xoff) * dstBpp;
 	    d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT);
 	    x &= FB_STIP_MASK;
-#ifdef FB_24BIT
 	    if (dstBpp == 24)
 	    {
 		FbStip	leftMask, rightMask;
@@ -97,7 +96,6 @@ fbDots (FbBits	    *dstOrig,
 		    WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
 	    }
 	    else
-#endif
 	    {
 		FbStip	mask;
 		mask = FbStipMask(x, dstBpp);
@@ -144,16 +142,12 @@ fbPolyPoint (DrawablePtr    pDrawable,
     and = pPriv->and;
     xor = pPriv->xor;
     dots = fbDots;
-#ifndef FBNOPIXADDR
     switch (dstBpp) {
     case 8:	dots = fbDots8; break;
     case 16:    dots = fbDots16; break;
-#ifdef FB_24BIT
     case 24:    dots = fbDots24; break;
-#endif
     case 32:    dots = fbDots32; break;
     }
-#endif
     for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip);
 	 nBox--; pBox++)
 	(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, 
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 2502efe..fa518f6 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -185,7 +185,6 @@ fbFinishScreenInit(ScreenPtr	pScreen,
      * pixels.  If you want real 24bit images, include a 24bpp
      * format in the pixmap formats
      */
-#ifdef FB_24_32BIT
     if (bpp == 24)
     {
 	int	f;
@@ -205,8 +204,6 @@ fbFinishScreenInit(ScreenPtr	pScreen,
 	    }
 	}	    
     }
-#endif
-#ifdef FB_SCREEN_PRIVATE
     if (imagebpp == 32)
     {
 	fbGetScreenPrivate(pScreen)->win32bpp = bpp;
@@ -221,7 +218,6 @@ fbFinishScreenInit(ScreenPtr	pScreen,
     fbGetScreenPrivate(pScreen)->setupWrap = setupWrap;
     fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
 #endif
-#endif
     rootdepth = 0;
     if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
 			&defaultVisual,((unsigned long)1<<(imagebpp-1)), 8))
@@ -236,13 +232,11 @@ fbFinishScreenInit(ScreenPtr	pScreen,
 	return FALSE;
     /* overwrite miCloseScreen with our own */
     pScreen->CloseScreen = fbCloseScreen;
-#ifdef FB_24_32BIT
     if (bpp == 24 && imagebpp == 32)
     {
 	pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
 	pScreen->CreateScreenResources = fb24_32CreateScreenResources;
     }
-#endif
     return TRUE;
 }
 
diff --git a/fb/fbseg.c b/fb/fbseg.c
index 7cc38a2..5a458fe 100644
--- a/fb/fbseg.c
+++ b/fb/fbseg.c
@@ -330,7 +330,6 @@ fbBresFillDash (DrawablePtr pDrawable,
 	fbSetFg (pDrawable, pGC, fg);
 }
 
-#ifdef FB_24BIT
 static void
 fbBresSolid24RRop (DrawablePtr  pDrawable,
 		   GCPtr	pGC,
@@ -507,7 +506,6 @@ fbBresDash24RRop (DrawablePtr	pDrawable,
 
     fbFinishAccess (pDrawable);
 }
-#endif
 
 /*
  * For drivers that want to bail drawing some lines, this
@@ -529,23 +527,17 @@ fbSelectBres (DrawablePtr   pDrawable,
 	if (pGC->fillStyle == FillSolid)
 	{
 	    bres = fbBresSolid;
-#ifdef FB_24BIT
 	    if (dstBpp == 24)
 		bres = fbBresSolid24RRop;
-#endif
-#ifndef FBNOPIXADDR
 	    if (pPriv->and == 0)
 	    {
 		switch (dstBpp) {
 		case 8:	bres = fbBresSolid8; break;
 		case 16: bres = fbBresSolid16; break;
-#ifdef FB_24BIT
 		case 24: bres = fbBresSolid24; break;
-#endif
 		case 32: bres = fbBresSolid32; break;
 		}
 	    }
-#endif
 	}
     }
     else
@@ -554,24 +546,18 @@ fbSelectBres (DrawablePtr   pDrawable,
 	if (pGC->fillStyle == FillSolid)
 	{
 	    bres = fbBresDash;
-#ifdef FB_24BIT
 	    if (dstBpp == 24)
 		bres = fbBresDash24RRop;
-#endif
-#ifndef FBNOPIXADDR
 	    if (pPriv->and == 0 && 
 		(pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0))
 	    {
 		switch (dstBpp) {
 		case 8:	bres = fbBresDash8; break;
 		case 16: bres = fbBresDash16; break;
-#ifdef FB_24BIT
 		case 24: bres = fbBresDash24; break;
-#endif
 		case 32: bres = fbBresDash32; break;
 		}
 	    }
-#endif
 	}
     }
     return bres;
diff --git a/fb/fbsetsp.c b/fb/fbsetsp.c
index 61dc4dc..65ec8b8 100644
--- a/fb/fbsetsp.c
+++ b/fb/fbsetsp.c
@@ -46,13 +46,11 @@ fbSetSpans (DrawablePtr	    pDrawable,
     int		    xoff;
     int		    x1, x2;
     
-#ifdef FB_24_32BIT
     if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
     {
 	fb24_32SetSpans (pDrawable, pGC, src, ppt, pwidth, nspans, fSorted);
 	return;
     }
-#endif
     fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
     while (nspans--)
     {
diff --git a/fb/fbsolid.c b/fb/fbsolid.c
index 53fcae0..4143785 100644
--- a/fb/fbsolid.c
+++ b/fb/fbsolid.c
@@ -44,13 +44,11 @@ fbSolid (FbBits	    *dst,
     int	    n, nmiddle;
     int	    startbyte, endbyte;
 
-#ifdef FB_24BIT
     if (bpp == 24 && (!FbCheck24Pix(and) || !FbCheck24Pix(xor)))
     {
 	fbSolid24 (dst, dstStride, dstX, width, height, and, xor);
 	return;
     }
-#endif
     dst += dstX >> FB_SHIFT;
     dstX &= FB_MASK;
     FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte, 
@@ -81,7 +79,6 @@ fbSolid (FbBits	    *dst,
     }
 }
 
-#ifdef FB_24BIT
 void
 fbSolid24 (FbBits   *dst,
 	   FbStride dstStride,
@@ -210,4 +207,3 @@ fbSolid24 (FbBits   *dst,
 	dst += dstStride;
     }
 }
-#endif
diff --git a/fb/fbstipple.c b/fb/fbstipple.c
index bc25e46..dc1fd46 100644
--- a/fb/fbstipple.c
+++ b/fb/fbstipple.c
@@ -26,7 +26,6 @@
 
 #include "fb.h"
 
-#ifndef FBNOPIXADDR
 /*
  * 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
@@ -78,7 +77,6 @@ fbTransparentSpan (FbBits   *dst,
 	LaneCases(dst);
     }
 }
-#endif
 
 void
 fbEvenStipple (FbBits	*dst,
@@ -170,7 +168,6 @@ fbEvenStipple (FbBits	*dst,
 	and = (fgand & mask) | (bgand & ~mask);
 	xor = (fgxor & mask) | (bgxor & ~mask);
 	
-#ifndef FBNOPIXADDR
 	if (transparent)
 	{
 	    if (startmask)
@@ -184,7 +181,6 @@ fbEvenStipple (FbBits	*dst,
 		fbTransparentSpan(dst, mask&endmask, fgxor, 1);
 	}
 	else
-#endif
 	{
 	    /*
 	     * Fill scanline
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index bb0384d..d01e6d4 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -33,10 +33,8 @@ fbCreateWindow(WindowPtr pWin)
 {
     dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(),
 		  fbGetScreenPixmap(pWin->drawable.pScreen));
-#ifdef FB_SCREEN_PRIVATE
     if (pWin->drawable.bitsPerPixel == 32)
 	pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp;
-#endif
     return TRUE;
 }
 
@@ -158,7 +156,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 	if (pWin->backgroundState == BackgroundPixmap)
 	{
 	    pPixmap = pWin->background.pixmap;
-#ifdef FB_24_32BIT
 	    if (pPixmap->drawable.bitsPerPixel != pWin->drawable.bitsPerPixel)
 	    {
 		pPixmap = fb24_32ReformatTile (pPixmap,
@@ -169,7 +166,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 		    pWin->background.pixmap = pPixmap;
 		}
 	    }
-#endif
 	    if (FbEvenTile (pPixmap->drawable.width *
 			    pPixmap->drawable.bitsPerPixel))
 		fbPadPixmap (pPixmap);
@@ -180,7 +176,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 	if (pWin->borderIsPixel == FALSE)
 	{
 	    pPixmap = pWin->border.pixmap;
-#ifdef FB_24_32BIT
 	    if (pPixmap->drawable.bitsPerPixel !=
 		pWin->drawable.bitsPerPixel)
 	    {
@@ -192,7 +187,6 @@ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
 		    pWin->border.pixmap = pPixmap;
 		}
 	    }
-#endif
 	    if (FbEvenTile (pPixmap->drawable.width *
 			    pPixmap->drawable.bitsPerPixel))
 		fbPadPixmap (pPixmap);
-- 
1.7.4.1



More information about the xorg-devel mailing list