[PATCH] fb: drop FB_SCREEN_PRIVATE and FB_24BIT and FB_24_32BIT ifdefs

Dave Airlie airlied at gmail.com
Mon Mar 28 20:34:07 PDT 2011


From: Dave Airlie <airlied at redhat.com>

These don't appear to ever be not wanted in the current server code,
this drops them all, it leaves FB_24_32BIT defines for the Intel
driver UXA code which seems to use the define.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 fb/fb.h        |   21 +--------------------
 fb/fballpriv.c |    6 ++----
 fb/fbarc.c     |    2 --
 fb/fbbits.c    |    2 --
 fb/fbblt.c     |   11 +----------
 fb/fbbltone.c  |   10 ----------
 fb/fbcopy.c    |    2 --
 fb/fbgc.c      |    2 --
 fb/fbgetsp.c   |    2 --
 fb/fbglyph.c   |    6 ------
 fb/fbimage.c   |    4 ----
 fb/fbline.c    |    4 ----
 fb/fboverlay.c |   10 ++--------
 fb/fbpixmap.c  |    2 --
 fb/fbpoint.c   |    4 ----
 fb/fbscreen.c  |    6 ------
 fb/fbseg.c     |   10 ----------
 fb/fbsetsp.c   |    2 --
 fb/fbsolid.c   |    5 +----
 fb/fbwindow.c  |    6 ------
 20 files changed, 7 insertions(+), 110 deletions(-)

diff --git a/fb/fb.h b/fb/fb.h
index 021a940..988136f 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -97,22 +97,13 @@
 #if GLYPHPADBYTES != 4
 #error "GLYPHPADBYTES must be 4"
 #endif
-/* whether to bother to include 24bpp support */
-#ifndef FBNO24BIT
-#define FB_24BIT
-#endif
 
+#define FB_24_32BIT /* for intel UXA */
 /*
  * 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)
 #define FB_STIP_MASK	(FB_STIP_UNIT - 1)
@@ -612,10 +603,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);
 typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
@@ -642,7 +629,6 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
 #endif
 
 
-#ifdef FB_SCREEN_PRIVATE
 extern _X_EXPORT DevPrivateKey
 fbGetScreenPrivateKey(void);
 
@@ -658,7 +644,6 @@ typedef struct {
 
 #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
 				     dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
-#endif
 
 /* private field of GC */
 typedef struct {
@@ -1223,7 +1208,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 +1224,6 @@ fbBltOne24 (FbStip    *src,
 	  FbBits    fgxor,
 	  FbBits    bgand,
 	  FbBits    bgxor);
-#endif
 
 extern _X_EXPORT void
 fbBltPlane (FbBits	    *src,
@@ -1868,7 +1851,6 @@ fbSolid (FbBits	    *dst,
 	 FbBits	    and,
 	 FbBits	    xor);
 
-#ifdef FB_24BIT
 extern _X_EXPORT void
 fbSolid24 (FbBits   *dst,
 	   FbStride dstStride,
@@ -1879,7 +1861,6 @@ fbSolid24 (FbBits   *dst,
 
 	   FbBits   and,
 	   FbBits   xor);
-#endif
 
 /*
  * fbstipple.c
diff --git a/fb/fballpriv.c b/fb/fballpriv.c
index efeb268..fb252f0 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,10 @@ 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..23763f1 100644
--- a/fb/fbarc.c
+++ b/fb/fbarc.c
@@ -55,9 +55,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;
 	    }
 	}
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..a5b64da 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,11 +336,9 @@ fbBlt (FbBits   *srcLine,
     }
 }
 
-#ifdef FB_24BIT
-
 #undef DEBUG_BLT24
-#ifdef DEBUG_BLT24
 
+#ifdef DEBUG_BLT24
 static unsigned long
 getPixel (char *src, int x)
 {
@@ -603,7 +599,6 @@ fbBlt24 (FbBits	    *srcLine,
     ErrorF ("\n");
 #endif
 }
-#endif /* FB_24BIT */
 
 #if FB_SHIFT == FB_STIP_SHIFT + 1
 
@@ -784,7 +779,6 @@ fbBltOdd (FbBits    *srcLine,
     }
 }
 
-#ifdef FB_24BIT
 void
 fbBltOdd24 (FbBits	*srcLine,
 	    FbStride	srcStrideEven,
@@ -826,7 +820,6 @@ fbBltOdd24 (FbBits	*srcLine,
 	}
     }
 }
-#endif
 
 #endif
 
@@ -915,7 +908,6 @@ fbBltStip (FbStip   *src,
 		     &dstStrideEven, &dstStrideOdd,
 		     &dstXEven, &dstXOdd);
 		     
-#ifdef FB_24BIT
 	if (bpp == 24 && !FbCheck24Pix (pm))
 	{
 	    fbBltOdd24  (s, srcStrideEven, srcStrideOdd,
@@ -927,7 +919,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..f085efd 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -169,7 +169,6 @@ fbBltOne (FbStip    *src,
 #endif
     int		    startbyte, endbyte;
 
-#ifdef FB_24BIT
     if (dstBpp == 24)
     {
 	fbBltOne24 (src, srcStride, srcX,
@@ -178,7 +177,6 @@ fbBltOne (FbStip    *src,
 		    fgand, fgxor, bgand, bgxor);
 	return;
     }
-#endif
 
     /*
      * Do not read past the end of the buffer!
@@ -419,7 +417,6 @@ fbBltOne (FbStip    *src,
     }
 }
 
-#ifdef FB_24BIT
 
 /*
  * Crufty macros to initialize the mask array, most of this
@@ -747,7 +744,6 @@ fbBltOne24 (FbStip	*srcLine,
 	}
     }
 }
-#endif
 
 /*
  * Not very efficient, but simple -- copy a single plane
@@ -801,7 +797,6 @@ fbBltPlane (FbBits	    *src,
     w = width / srcBpp;
 
     pm = fbReplicatePixel (planeMask, srcBpp);
-#ifdef FB_24BIT
     if (srcBpp == 24)
     {
 	int w = 24;
@@ -812,7 +807,6 @@ fbBltPlane (FbBits	    *src,
 	srcMaskFirst = FbRot24(pm,rot0) & FbBitsMask(srcX,w);
     }
     else
-#endif
     {
 	rot0 = 0;
 	srcMaskFirst = pm & FbBitsMask(srcX, srcBpp);
@@ -828,10 +822,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 +837,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..e8ca067 100644
--- a/fb/fbglyph.c
+++ b/fb/fbglyph.c
@@ -57,7 +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)
@@ -67,7 +66,6 @@ fbGlyphIn (RegionPtr	pRegion,
 #define WRITE8(d)	WRITE((FbBits *) &(d[0]), fg)
 #else
 #define WRITE8(d)	WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
-#endif
 			 
 /*
  * This is a bit tricky, but it's brief.  Write 12 bytes worth
@@ -286,9 +284,7 @@ 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;
 	}
     }
@@ -379,9 +375,7 @@ 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;
 	}
     }
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..3372365 100644
--- a/fb/fbline.c
+++ b/fb/fbline.c
@@ -122,9 +122,7 @@ 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;
 	    }
 	}
@@ -159,9 +157,7 @@ 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;
 	    }
 	}
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 7fca89c..d96b70c 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,7 @@ fbOverlayFinishScreenInit(ScreenPtr	pScreen,
 	    }
 	}	    
     }
-#endif
-#ifdef FB_SCREEN_PRIVATE
+
     if (imagebpp == 32)
     {
 	fbGetScreenPrivate(pScreen)->win32bpp = bpp;
@@ -386,7 +382,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 +416,12 @@ 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..30bec0a 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);
@@ -148,9 +146,7 @@ fbPolyPoint (DrawablePtr    pDrawable,
     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
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..4f48d83 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,19 +527,15 @@ 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;
 		}
 	    }
@@ -554,10 +548,8 @@ 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))
@@ -565,9 +557,7 @@ fbSelectBres (DrawablePtr   pDrawable,
 		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;
 		}
 	    }
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..7759956 100644
--- a/fb/fbsolid.c
+++ b/fb/fbsolid.c
@@ -44,13 +44,12 @@ 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 +80,6 @@ fbSolid (FbBits	    *dst,
     }
 }
 
-#ifdef FB_24BIT
 void
 fbSolid24 (FbBits   *dst,
 	   FbStride dstStride,
@@ -210,4 +208,3 @@ fbSolid24 (FbBits   *dst,
 	dst += dstStride;
     }
 }
-#endif
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.1



More information about the xorg-devel mailing list