Clean up unused #ifdefs from fb.
This commit is contained in:
parent
9ff7ff2fda
commit
bcb2352742
34
fb/fb.h
34
fb/fb.h
|
@ -609,16 +609,6 @@ extern int fbGetWinPrivateIndex(void);
|
|||
extern const GCOps fbGCOps;
|
||||
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
|
||||
#define FB_SCREEN_PRIVATE
|
||||
#endif
|
||||
|
@ -669,15 +659,6 @@ typedef struct {
|
|||
|
||||
/* private field of GC */
|
||||
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 bgand, bgxor; /* for stipples */
|
||||
FbBits fg, bg, pm; /* expanded and filled */
|
||||
|
@ -690,17 +671,10 @@ typedef struct {
|
|||
#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
|
||||
(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 fbGetExpose(pGC) ((pGC)->fExpose)
|
||||
#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
|
||||
#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
|
||||
#endif
|
||||
|
||||
#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
|
||||
#ifdef FB_NO_WINDOW_PIXMAPS
|
||||
|
@ -775,12 +749,6 @@ typedef struct {
|
|||
((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
||||
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)
|
||||
/*
|
||||
* Accelerated tiles are power of 2 width <= FB_UNIT
|
||||
|
@ -1790,13 +1758,11 @@ fbQueryBestSize (int class,
|
|||
unsigned short *width, unsigned short *height,
|
||||
ScreenPtr pScreen);
|
||||
|
||||
#ifndef FB_OLD_SCREEN
|
||||
PixmapPtr
|
||||
_fbGetWindowPixmap (WindowPtr pWindow);
|
||||
|
||||
void
|
||||
_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap);
|
||||
#endif
|
||||
|
||||
Bool
|
||||
fbSetupScreen(ScreenPtr pScreen,
|
||||
|
|
|
@ -47,10 +47,6 @@ int fbGetWinPrivateIndex(void)
|
|||
#endif
|
||||
int fbGeneration;
|
||||
|
||||
#ifdef FB_OLD_SCREEN
|
||||
#define miAllocateGCPrivateIndex() AllocateGCPrivateIndex()
|
||||
#endif
|
||||
|
||||
Bool
|
||||
fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
|
||||
{
|
||||
|
|
|
@ -413,11 +413,7 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
|||
return FALSE;
|
||||
if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0,
|
||||
depth1, ndepths, depths,
|
||||
defaultVisual, nvisuals, visuals
|
||||
#ifdef FB_OLD_MISCREENINIT
|
||||
, (miBSFuncPtr) 0
|
||||
#endif
|
||||
))
|
||||
defaultVisual, nvisuals, visuals))
|
||||
return FALSE;
|
||||
/* MI thinks there's no frame buffer */
|
||||
#ifdef MITSHM
|
||||
|
|
|
@ -81,7 +81,6 @@ fbQueryBestSize (int class,
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef FB_OLD_SCREEN
|
||||
PixmapPtr
|
||||
_fbGetWindowPixmap (WindowPtr pWindow)
|
||||
{
|
||||
|
@ -97,7 +96,6 @@ _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap)
|
|||
pWindow->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Bool
|
||||
fbSetupScreen(ScreenPtr pScreen,
|
||||
|
@ -141,7 +139,6 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
pScreen->ResolveColor = fbResolveColor;
|
||||
pScreen->BitmapToRegion = fbPixmapToRegion;
|
||||
|
||||
#ifndef FB_OLD_SCREEN
|
||||
pScreen->GetWindowPixmap = _fbGetWindowPixmap;
|
||||
pScreen->SetWindowPixmap = _fbSetWindowPixmap;
|
||||
|
||||
|
@ -150,7 +147,6 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
pScreen->BackingStoreFuncs.SetClipmaskRgn = 0;
|
||||
pScreen->BackingStoreFuncs.GetImagePixmap = 0;
|
||||
pScreen->BackingStoreFuncs.GetSpansPixmap = 0;
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -247,11 +243,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
return FALSE;
|
||||
if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
|
||||
rootdepth, ndepths, depths,
|
||||
defaultVisual, nvisuals, visuals
|
||||
#ifdef FB_OLD_MISCREENINIT
|
||||
, (miBSFuncPtr) 0
|
||||
#endif
|
||||
))
|
||||
defaultVisual, nvisuals, visuals))
|
||||
return FALSE;
|
||||
/* overwrite miCloseScreen with our own */
|
||||
pScreen->CloseScreen = fbCloseScreen;
|
||||
|
@ -313,26 +305,3 @@ fbScreenInit(ScreenPtr pScreen,
|
|||
return TRUE;
|
||||
}
|
||||
#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
|
||||
|
|
|
@ -289,11 +289,7 @@ s3RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
{
|
||||
if (pCursor)
|
||||
{
|
||||
#ifdef FB_OLD_SCREEN
|
||||
short x, y;
|
||||
#else
|
||||
int x, y;
|
||||
#endif
|
||||
|
||||
miPointerPosition (&x, &y);
|
||||
s3LoadCursor (pScreen, x, y);
|
||||
|
@ -390,11 +386,7 @@ s3CursorEnable (ScreenPtr pScreen)
|
|||
{
|
||||
if (pCurPriv->pCursor)
|
||||
{
|
||||
#ifdef FB_OLD_SCREEN
|
||||
short x, y;
|
||||
#else
|
||||
int x, y;
|
||||
#endif
|
||||
|
||||
miPointerPosition (&x, &y);
|
||||
s3LoadCursor (pScreen, x, y);
|
||||
|
|
|
@ -293,13 +293,8 @@ KdScreenInitAsync (ScreenPtr pScreen)
|
|||
pScreen->PaintWindowBorder = KdCheckPaintWindow;
|
||||
pScreen->CopyWindow = KdCheckCopyWindow;
|
||||
|
||||
#ifndef FB_OLD_SCREEN
|
||||
pScreen->BackingStoreFuncs.SaveAreas = KdCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = KdCheckRestoreAreas;
|
||||
#else
|
||||
pScreenPriv->BackingStoreFuncs.SaveAreas = KdCheckSaveAreas;
|
||||
pScreenPriv->BackingStoreFuncs.RestoreAreas = KdCheckRestoreAreas;
|
||||
#endif
|
||||
#ifdef RENDER
|
||||
KdPictureInitAsync (pScreen);
|
||||
#endif
|
||||
|
|
|
@ -95,7 +95,6 @@ extern WindowPtr *WindowTable;
|
|||
void
|
||||
KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
||||
{
|
||||
#ifndef FB_OLD_SCREEN
|
||||
WindowPtr pWin = WindowTable[pScreen->myNum];
|
||||
WindowPtr pChild;
|
||||
Bool WasViewable;
|
||||
|
@ -222,7 +221,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
|
|||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured ();
|
||||
#endif /* !FB_OLD_SCREEN */
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1065,14 +1063,6 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
|
|||
pScreen->SaveScreen = KdSaveScreen;
|
||||
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 (screen->fb[1].depth)
|
||||
{
|
||||
|
@ -1154,12 +1144,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
|
|||
|
||||
#if 0
|
||||
pScreen->backingStoreSupport = Always;
|
||||
#ifdef FB_OLD_SCREEN
|
||||
miInitializeBackingStore (pScreen, &pScreenPriv->BackingStoreFuncs);
|
||||
#else
|
||||
miInitializeBackingStore (pScreen);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -213,9 +213,6 @@ typedef struct {
|
|||
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
#ifdef FB_OLD_SCREEN
|
||||
miBSFuncRec BackingStoreFuncs;
|
||||
#endif
|
||||
} KdPrivScreenRec, *KdPrivScreenPtr;
|
||||
|
||||
typedef enum _kdPointerState {
|
||||
|
|
|
@ -277,11 +277,7 @@ s3RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
{
|
||||
if (pCursor)
|
||||
{
|
||||
#ifdef FB_OLD_SCREEN
|
||||
short x, y;
|
||||
#else
|
||||
int x, y;
|
||||
#endif
|
||||
|
||||
miPointerPosition (&x, &y);
|
||||
s3LoadCursor (pScreen, x, y);
|
||||
|
@ -376,11 +372,7 @@ s3CursorEnable (ScreenPtr pScreen)
|
|||
{
|
||||
if (pCurPriv->pCursor)
|
||||
{
|
||||
#ifdef FB_OLD_SCREEN
|
||||
short x, y;
|
||||
#else
|
||||
int x, y;
|
||||
#endif
|
||||
|
||||
miPointerPosition (&x, &y);
|
||||
s3LoadCursor (pScreen, x, y);
|
||||
|
|
Loading…
Reference in New Issue