Clean up unused #ifdefs from fb.

This commit is contained in:
Adam Jackson 2007-07-05 15:56:25 -04:00
parent 9ff7ff2fda
commit bcb2352742
9 changed files with 2 additions and 113 deletions

34
fb/fb.h
View File

@ -609,16 +609,6 @@ extern int fbGetWinPrivateIndex(void);
extern const GCOps fbGCOps; extern const GCOps fbGCOps;
extern const GCFuncs fbGCFuncs; extern const GCFuncs fbGCFuncs;
#ifdef TEKX11
#define FB_OLD_GC
#define FB_OLD_SCREEN
#endif
#ifdef FB_OLD_SCREEN
# define FB_OLD_MISCREENINIT /* miScreenInit requires 14 args, not 13 */
extern WindowPtr *WindowTable;
#endif
#ifdef FB_24_32BIT #ifdef FB_24_32BIT
#define FB_SCREEN_PRIVATE #define FB_SCREEN_PRIVATE
#endif #endif
@ -669,15 +659,6 @@ typedef struct {
/* private field of GC */ /* private field of GC */
typedef struct { typedef struct {
#ifdef FB_OLD_GC
unsigned char pad1;
unsigned char pad2;
unsigned char pad3;
unsigned fExpose:1;
unsigned freeCompClip:1;
PixmapPtr pRotatedPixmap;
RegionPtr pCompositeClip;
#endif
FbBits and, xor; /* reduced rop values */ FbBits and, xor; /* reduced rop values */
FbBits bgand, bgxor; /* for stipples */ FbBits bgand, bgxor; /* for stipples */
FbBits fg, bg, pm; /* expanded and filled */ FbBits fg, bg, pm; /* expanded and filled */
@ -690,17 +671,10 @@ typedef struct {
#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ #define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
(pGC)->devPrivates[fbGetGCPrivateIndex()].ptr) (pGC)->devPrivates[fbGetGCPrivateIndex()].ptr)
#ifdef FB_OLD_GC
#define fbGetCompositeClip(pGC) (fbGetGCPrivate(pGC)->pCompositeClip)
#define fbGetExpose(pGC) (fbGetGCPrivate(pGC)->fExpose)
#define fbGetFreeCompClip(pGC) (fbGetGCPrivate(pGC)->freeCompClip)
#define fbGetRotatedPixmap(pGC) (fbGetGCPrivate(pGC)->pRotatedPixmap)
#else
#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip) #define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
#define fbGetExpose(pGC) ((pGC)->fExpose) #define fbGetExpose(pGC) ((pGC)->fExpose)
#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip) #define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap) #define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
#endif
#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate) #define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
#ifdef FB_NO_WINDOW_PIXMAPS #ifdef FB_NO_WINDOW_PIXMAPS
@ -775,12 +749,6 @@ typedef struct {
((pDrawable)->type == DRAWABLE_PIXMAP ? \ ((pDrawable)->type == DRAWABLE_PIXMAP ? \
TRUE : fbWindowEnabled((WindowPtr) pDrawable)) TRUE : fbWindowEnabled((WindowPtr) pDrawable))
#ifdef FB_OLD_SCREEN
#define BitsPerPixel(d) (\
((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
(PixmapWidthPaddingInfo[d].padRoundUp+1)))
#endif
#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0) #define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0)
/* /*
* Accelerated tiles are power of 2 width <= FB_UNIT * Accelerated tiles are power of 2 width <= FB_UNIT
@ -1790,13 +1758,11 @@ fbQueryBestSize (int class,
unsigned short *width, unsigned short *height, unsigned short *width, unsigned short *height,
ScreenPtr pScreen); ScreenPtr pScreen);
#ifndef FB_OLD_SCREEN
PixmapPtr PixmapPtr
_fbGetWindowPixmap (WindowPtr pWindow); _fbGetWindowPixmap (WindowPtr pWindow);
void void
_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap); _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap);
#endif
Bool Bool
fbSetupScreen(ScreenPtr pScreen, fbSetupScreen(ScreenPtr pScreen,

View File

@ -47,10 +47,6 @@ int fbGetWinPrivateIndex(void)
#endif #endif
int fbGeneration; int fbGeneration;
#ifdef FB_OLD_SCREEN
#define miAllocateGCPrivateIndex() AllocateGCPrivateIndex()
#endif
Bool Bool
fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex) fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
{ {

View File

@ -413,11 +413,7 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
return FALSE; return FALSE;
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0, if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
depth1, ndepths, depths, depth1, ndepths, depths,
defaultVisual, nvisuals, visuals defaultVisual, nvisuals, visuals))
#ifdef FB_OLD_MISCREENINIT
, (miBSFuncPtr) 0
#endif
))
return FALSE; return FALSE;
/* MI thinks there's no frame buffer */ /* MI thinks there's no frame buffer */
#ifdef MITSHM #ifdef MITSHM

View File

@ -81,7 +81,6 @@ fbQueryBestSize (int class,
} }
} }
#ifndef FB_OLD_SCREEN
PixmapPtr PixmapPtr
_fbGetWindowPixmap (WindowPtr pWindow) _fbGetWindowPixmap (WindowPtr pWindow)
{ {
@ -97,7 +96,6 @@ _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap)
pWindow->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap; pWindow->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap;
#endif #endif
} }
#endif
Bool Bool
fbSetupScreen(ScreenPtr pScreen, fbSetupScreen(ScreenPtr pScreen,
@ -141,7 +139,6 @@ fbSetupScreen(ScreenPtr pScreen,
pScreen->ResolveColor = fbResolveColor; pScreen->ResolveColor = fbResolveColor;
pScreen->BitmapToRegion = fbPixmapToRegion; pScreen->BitmapToRegion = fbPixmapToRegion;
#ifndef FB_OLD_SCREEN
pScreen->GetWindowPixmap = _fbGetWindowPixmap; pScreen->GetWindowPixmap = _fbGetWindowPixmap;
pScreen->SetWindowPixmap = _fbSetWindowPixmap; pScreen->SetWindowPixmap = _fbSetWindowPixmap;
@ -150,7 +147,6 @@ fbSetupScreen(ScreenPtr pScreen,
pScreen->BackingStoreFuncs.SetClipmaskRgn = 0; pScreen->BackingStoreFuncs.SetClipmaskRgn = 0;
pScreen->BackingStoreFuncs.GetImagePixmap = 0; pScreen->BackingStoreFuncs.GetImagePixmap = 0;
pScreen->BackingStoreFuncs.GetSpansPixmap = 0; pScreen->BackingStoreFuncs.GetSpansPixmap = 0;
#endif
return TRUE; return TRUE;
} }
@ -247,11 +243,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
return FALSE; return FALSE;
if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
rootdepth, ndepths, depths, rootdepth, ndepths, depths,
defaultVisual, nvisuals, visuals defaultVisual, nvisuals, visuals))
#ifdef FB_OLD_MISCREENINIT
, (miBSFuncPtr) 0
#endif
))
return FALSE; return FALSE;
/* overwrite miCloseScreen with our own */ /* overwrite miCloseScreen with our own */
pScreen->CloseScreen = fbCloseScreen; pScreen->CloseScreen = fbCloseScreen;
@ -313,26 +305,3 @@ fbScreenInit(ScreenPtr pScreen,
return TRUE; return TRUE;
} }
#endif #endif
#ifdef FB_OLD_SCREEN
const miBSFuncRec fbBSFuncRec = {
fbSaveAreas,
fbRestoreAreas,
(void (*)(GCPtr, RegionPtr)) 0,
(PixmapPtr (*)(void)) 0,
(PixmapPtr (*)(void)) 0,
};
#endif
#if 0
void
fbInitializeBackingStore (ScreenPtr pScreen)
{
#ifdef FB_OLD_SCREEN
miInitializeBackingStore (pScreen, (miBSFuncRec *) &fbBSFuncRec);
#else
miInitializeBackingStore (pScreen);
#endif
}
#endif

View File

@ -289,11 +289,7 @@ s3RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
{ {
if (pCursor) if (pCursor)
{ {
#ifdef FB_OLD_SCREEN
short x, y;
#else
int x, y; int x, y;
#endif
miPointerPosition (&x, &y); miPointerPosition (&x, &y);
s3LoadCursor (pScreen, x, y); s3LoadCursor (pScreen, x, y);
@ -390,11 +386,7 @@ s3CursorEnable (ScreenPtr pScreen)
{ {
if (pCurPriv->pCursor) if (pCurPriv->pCursor)
{ {
#ifdef FB_OLD_SCREEN
short x, y;
#else
int x, y; int x, y;
#endif
miPointerPosition (&x, &y); miPointerPosition (&x, &y);
s3LoadCursor (pScreen, x, y); s3LoadCursor (pScreen, x, y);

View File

@ -293,13 +293,8 @@ KdScreenInitAsync (ScreenPtr pScreen)
pScreen->PaintWindowBorder = KdCheckPaintWindow; pScreen->PaintWindowBorder = KdCheckPaintWindow;
pScreen->CopyWindow = KdCheckCopyWindow; pScreen->CopyWindow = KdCheckCopyWindow;
#ifndef FB_OLD_SCREEN
pScreen->BackingStoreFuncs.SaveAreas = KdCheckSaveAreas; pScreen->BackingStoreFuncs.SaveAreas = KdCheckSaveAreas;
pScreen->BackingStoreFuncs.RestoreAreas = KdCheckRestoreAreas; pScreen->BackingStoreFuncs.RestoreAreas = KdCheckRestoreAreas;
#else
pScreenPriv->BackingStoreFuncs.SaveAreas = KdCheckSaveAreas;
pScreenPriv->BackingStoreFuncs.RestoreAreas = KdCheckRestoreAreas;
#endif
#ifdef RENDER #ifdef RENDER
KdPictureInitAsync (pScreen); KdPictureInitAsync (pScreen);
#endif #endif

View File

@ -95,7 +95,6 @@ extern WindowPtr *WindowTable;
void void
KdSetRootClip (ScreenPtr pScreen, BOOL enable) KdSetRootClip (ScreenPtr pScreen, BOOL enable)
{ {
#ifndef FB_OLD_SCREEN
WindowPtr pWin = WindowTable[pScreen->myNum]; WindowPtr pWin = WindowTable[pScreen->myNum];
WindowPtr pChild; WindowPtr pChild;
Bool WasViewable; Bool WasViewable;
@ -222,7 +221,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
} }
if (pWin->realized) if (pWin->realized)
WindowsRestructured (); WindowsRestructured ();
#endif /* !FB_OLD_SCREEN */
} }
void void
@ -1065,14 +1063,6 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
pScreen->SaveScreen = KdSaveScreen; pScreen->SaveScreen = KdSaveScreen;
pScreen->CreateWindow = KdCreateWindow; pScreen->CreateWindow = KdCreateWindow;
#ifdef FB_OLD_SCREEN
pScreenPriv->BackingStoreFuncs.SaveAreas = fbSaveAreas;
pScreenPriv->BackingStoreFuncs.RestoreAreas = fbSaveAreas;
pScreenPriv->BackingStoreFuncs.SetClipmaskRgn = 0;
pScreenPriv->BackingStoreFuncs.GetImagePixmap = 0;
pScreenPriv->BackingStoreFuncs.GetSpansPixmap = 0;
#endif
#if KD_MAX_FB > 1 #if KD_MAX_FB > 1
if (screen->fb[1].depth) if (screen->fb[1].depth)
{ {
@ -1154,12 +1144,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
#if 0 #if 0
pScreen->backingStoreSupport = Always; pScreen->backingStoreSupport = Always;
#ifdef FB_OLD_SCREEN
miInitializeBackingStore (pScreen, &pScreenPriv->BackingStoreFuncs);
#else
miInitializeBackingStore (pScreen); miInitializeBackingStore (pScreen);
#endif #endif
#endif
/* /*

View File

@ -213,9 +213,6 @@ typedef struct {
CreateScreenResourcesProcPtr CreateScreenResources; CreateScreenResourcesProcPtr CreateScreenResources;
CloseScreenProcPtr CloseScreen; CloseScreenProcPtr CloseScreen;
#ifdef FB_OLD_SCREEN
miBSFuncRec BackingStoreFuncs;
#endif
} KdPrivScreenRec, *KdPrivScreenPtr; } KdPrivScreenRec, *KdPrivScreenPtr;
typedef enum _kdPointerState { typedef enum _kdPointerState {

View File

@ -277,11 +277,7 @@ s3RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
{ {
if (pCursor) if (pCursor)
{ {
#ifdef FB_OLD_SCREEN
short x, y;
#else
int x, y; int x, y;
#endif
miPointerPosition (&x, &y); miPointerPosition (&x, &y);
s3LoadCursor (pScreen, x, y); s3LoadCursor (pScreen, x, y);
@ -376,11 +372,7 @@ s3CursorEnable (ScreenPtr pScreen)
{ {
if (pCurPriv->pCursor) if (pCurPriv->pCursor)
{ {
#ifdef FB_OLD_SCREEN
short x, y;
#else
int x, y; int x, y;
#endif
miPointerPosition (&x, &y); miPointerPosition (&x, &y);
s3LoadCursor (pScreen, x, y); s3LoadCursor (pScreen, x, y);