diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-03-06 15:32:13 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> | 2007-03-06 17:05:03 -0500 |
commit | a7cd53deb99957dec27a55ffd75e548b322ae0ce (patch) | |
tree | e6bcdc483b086b3336725f3d654932ddcd579a29 | |
parent | 024bbc7cbb924daaf3e305ddfc8e74509acd1e15 (diff) |
remove PIXPRIV checks as this flag is always set.
-rw-r--r-- | Xext/shm.c | 23 | ||||
-rw-r--r-- | afb/afbpixmap.c | 4 | ||||
-rw-r--r-- | cfb/cfbpixmap.c | 4 | ||||
-rw-r--r-- | dix/main.c | 6 | ||||
-rw-r--r-- | dix/privates.c | 2 | ||||
-rw-r--r-- | fb/fbpixmap.c | 4 | ||||
-rw-r--r-- | hw/dmx/dmxpixmap.c | 4 | ||||
-rw-r--r-- | hw/dmx/dmxscrinit.c | 6 | ||||
-rw-r--r-- | hw/xfree86/loader/dixsym.c | 2 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcPixmap.c | 4 | ||||
-rw-r--r-- | hw/xnest/Pixmap.c | 6 | ||||
-rw-r--r-- | hw/xnest/Screen.c | 4 | ||||
-rw-r--r-- | hw/xnest/XNPixmap.h | 7 | ||||
-rw-r--r-- | include/pixmapstr.h | 2 | ||||
-rw-r--r-- | include/screenint.h | 4 | ||||
-rw-r--r-- | include/scrnintstr.h | 2 | ||||
-rw-r--r-- | mfb/mfbpixmap.c | 4 |
17 files changed, 0 insertions, 88 deletions
diff --git a/Xext/shm.c b/Xext/shm.c index 7cfaa6808..ac587bef7 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -119,9 +119,7 @@ static int pixmapFormat; static int shmPixFormat[MAXSCREENS]; static ShmFuncsPtr shmFuncs[MAXSCREENS]; static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS]; -#ifdef PIXPRIV static int shmPixmapPrivate; -#endif static ShmFuncs miFuncs = {NULL, miShmPutImage}; static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage}; @@ -237,7 +235,6 @@ ShmExtensionInit(INITARGS) destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap; screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap; } -#ifdef PIXPRIV shmPixmapPrivate = AllocatePixmapPrivateIndex(); for (i = 0; i < screenInfo.numScreens; i++) { @@ -245,7 +242,6 @@ ShmExtensionInit(INITARGS) shmPixmapPrivate, 0)) return; } -#endif } } ShmSegType = CreateNewResourceType(ShmDetachSegment); @@ -299,22 +295,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap) if (pPixmap->refcnt == 1) { ShmDescPtr shmdesc; -#ifdef PIXPRIV shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr; -#else - char *base = (char *) pPixmap->devPrivate.ptr; - - if (base != (pointer) (pPixmap + 1)) - { - for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next) - { - if (shmdesc->addr <= base && base <= shmdesc->addr + shmdesc->size) - break; - } - } - else - shmdesc = 0; -#endif if (shmdesc) ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id); } @@ -781,9 +762,7 @@ CreatePmap: shmdesc->addr + stuff->offset); if (pMap) { -#ifdef PIXPRIV pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; -#endif shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = newPix->info[j].id; @@ -1097,9 +1076,7 @@ CreatePmap: shmdesc->addr + stuff->offset); if (pMap) { -#ifdef PIXPRIV pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; -#endif shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = stuff->pid; diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c index 6801960c6..6a3a48518 100644 --- a/afb/afbpixmap.c +++ b/afb/afbpixmap.c @@ -102,12 +102,8 @@ afbCreatePixmap(pScreen, width, height, depth) pPixmap->drawable.height = height; pPixmap->devKind = paddedWidth; pPixmap->refcnt = 1; -#ifdef PIXPRIV pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; -#else - pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); -#endif return(pPixmap); } diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index d51c5187c..6fdf3eae6 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -96,12 +96,8 @@ cfbCreatePixmap (pScreen, width, height, depth) pPixmap->drawable.height = height; pPixmap->devKind = paddedWidth; pPixmap->refcnt = 1; -#ifdef PIXPRIV pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; -#else - pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); -#endif return pPixmap; } diff --git a/dix/main.c b/dix/main.c index 3a77533a5..92c30b639 100644 --- a/dix/main.c +++ b/dix/main.c @@ -361,9 +361,7 @@ main(int argc, char *argv[], char *envp[]) ResetScreenPrivates(); ResetWindowPrivates(); ResetGCPrivates(); -#ifdef PIXPRIV ResetPixmapPrivates(); -#endif ResetColormapPrivates(); ResetFontPrivateIndex(); ResetDevicePrivateIndex(); @@ -731,11 +729,9 @@ AddScreen( pScreen->GCPrivateSizes = (unsigned *)NULL; pScreen->totalGCSize = ((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); -#ifdef PIXPRIV pScreen->PixmapPrivateLen = 0; pScreen->PixmapPrivateSizes = (unsigned *)NULL; pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); -#endif pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; @@ -799,9 +795,7 @@ FreeScreen(ScreenPtr pScreen) { xfree(pScreen->WindowPrivateSizes); xfree(pScreen->GCPrivateSizes); -#ifdef PIXPRIV xfree(pScreen->PixmapPrivateSizes); -#endif xfree(pScreen->devPrivates); xfree(pScreen); } diff --git a/dix/privates.c b/dix/privates.c index b20a1dbf0..a61c3cbb6 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -309,7 +309,6 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount) /* * pixmap private machinery */ -#ifdef PIXPRIV static int pixmapPrivateCount; void @@ -355,7 +354,6 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount) pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8); return TRUE; } -#endif /* diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c index c2ddcb0e9..18c120440 100644 --- a/fb/fbpixmap.c +++ b/fb/fbpixmap.c @@ -43,11 +43,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) if (paddedWidth / 4 > 32767 || height > 32767) return NullPixmap; datasize = height * paddedWidth; -#ifdef PIXPRIV base = pScreen->totalPixmapSize; -#else - base = sizeof (PixmapRec); -#endif adjust = 0; if (base & 7) adjust = 8 - (base & 7); diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c index 4a669fdd9..934060675 100644 --- a/hw/dmx/dmxpixmap.c +++ b/hw/dmx/dmxpixmap.c @@ -49,15 +49,11 @@ /** Initialize a private area in \a pScreen for pixmap information. */ Bool dmxInitPixmap(ScreenPtr pScreen) { -#ifdef PIXPRIV if (!AllocatePixmapPrivate(pScreen, dmxPixPrivateIndex, sizeof(dmxPixPrivRec))) return FALSE; return TRUE; -#else -#error Must define PIXPRIV to compile DMX X server -#endif } /** Create a pixmap on the back-end server. */ diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index 5bfb4df0a..7c315d89f 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -70,9 +70,7 @@ static unsigned long *dmxCursorGeneration; int dmxGCPrivateIndex; /**< Private index for GCs */ int dmxWinPrivateIndex; /**< Private index for Windows */ -#ifdef PIXPRIV int dmxPixPrivateIndex; /**< Private index for Pixmaps */ -#endif int dmxFontPrivateIndex; /**< Private index for Fonts */ int dmxScreenPrivateIndex; /**< Private index for Screens */ int dmxColormapPrivateIndex; /**< Private index for Colormaps */ @@ -233,14 +231,10 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) if (dmxWinPrivateIndex == -1) return FALSE; -#ifdef PIXPRIV /* Allocate pixmap private index */ dmxPixPrivateIndex = AllocatePixmapPrivateIndex(); if (dmxPixPrivateIndex == -1) return FALSE; -#else -#error Must define PIXPRIV to compile DMX X server -#endif /* Allocate font private index */ dmxFontPrivateIndex = AllocateFontPrivateIndex(); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 32e0e4f68..594bf4377 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -271,10 +271,8 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(AllocateColormapPrivateIndex) SYMFUNC(AllocateDevicePrivateIndex) SYMFUNC(AllocateDevicePrivate) -#ifdef PIXPRIV SYMFUNC(AllocatePixmapPrivateIndex) SYMFUNC(AllocatePixmapPrivate) -#endif /* resource.c */ SYMFUNC(AddResource) SYMFUNC(ChangeResourceValue) diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c index 9f4cdc99a..9b2defda1 100644 --- a/hw/xfree86/xf4bpp/ppcPixmap.c +++ b/hw/xfree86/xf4bpp/ppcPixmap.c @@ -120,12 +120,8 @@ xf4bppCreatePixmap( pScreen, width, height, depth ) pPixmap->devKind = size; pPixmap->refcnt = 1 ; size = height * pPixmap->devKind ; -#ifdef PIXPRIV pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap) + pScreen->totalPixmapSize); -#else - pPixmap->devPrivate.ptr = (pointer) (pPixmap + 1); -#endif bzero( (char *) pPixmap->devPrivate.ptr, size ) ; return pPixmap ; } diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index aa8bed933..612df8dac 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -32,9 +32,7 @@ is" without express or implied warranty. #include "Screen.h" #include "XNPixmap.h" -#ifdef PIXPRIV int xnestPixmapPrivateIndex; -#endif PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth) @@ -57,12 +55,8 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth) pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->refcnt = 1; pPixmap->devKind = PixmapBytePad(width, depth); -#ifdef PIXPRIV pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr = (pointer)((char *)pPixmap + pScreen->totalPixmapSize); -#else - pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); -#endif if (width && height) xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 8e86efbdb..e6870e702 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -49,9 +49,7 @@ Window xnestScreenSaverWindows[MAXSCREENS]; extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); #endif -#ifdef PIXPRIV int xnestScreenGeneration = -1; -#endif ScreenPtr xnestScreen(Window window) @@ -154,7 +152,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) sizeof(xnestPrivGC)))) return False; -#ifdef PIXPRIV if (xnestScreenGeneration != serverGeneration) { if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0) return False; @@ -164,7 +161,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex, sizeof (xnestPrivPixmap))) return False; -#endif visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec)); numVisuals = 0; diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h index 77cba24af..6971b1162 100644 --- a/hw/xnest/XNPixmap.h +++ b/hw/xnest/XNPixmap.h @@ -15,21 +15,14 @@ is" without express or implied warranty. #ifndef XNESTPIXMAP_H #define XNESTPIXMAP_H -#ifdef PIXPRIV extern int xnestPixmapPrivateIndex; -#endif typedef struct { Pixmap pixmap; } xnestPrivPixmap; -#ifdef PIXPRIV #define xnestPixmapPriv(pPixmap) \ ((xnestPrivPixmap *)((pPixmap)->devPrivates[xnestPixmapPrivateIndex].ptr)) -#else -#define xnestPixmapPriv(pPixmap) \ - ((xnestPrivPixmap *)((pPixmap)->devPrivate.ptr)) -#endif #define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap) diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 628465b97..93bd45db8 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -86,9 +86,7 @@ typedef struct _Pixmap { int refcnt; int devKind; DevUnion devPrivate; -#ifdef PIXPRIV DevUnion *devPrivates; /* real devPrivates like gcs & windows */ -#endif #ifdef COMPOSITE short screen_x; short screen_y; diff --git a/include/screenint.h b/include/screenint.h index e60c2480c..1f1434a84 100644 --- a/include/screenint.h +++ b/include/screenint.h @@ -86,8 +86,6 @@ extern int AddScreen( int /*argc*/, char** /*argv*/); -#ifdef PIXPRIV - extern void ResetPixmapPrivates(void); extern int AllocatePixmapPrivateIndex(void); @@ -97,8 +95,6 @@ extern Bool AllocatePixmapPrivate( int /* index */, unsigned /* amount */); -#endif /* PIXPRIV */ - extern void ResetColormapPrivates(void); diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 36135153f..110f4dce9 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -558,11 +558,9 @@ typedef struct _Screen { PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */ -#ifdef PIXPRIV int PixmapPrivateLen; unsigned int *PixmapPrivateSizes; unsigned int totalPixmapSize; -#endif MarkWindowProcPtr MarkWindow; MarkOverlappedWindowsProcPtr MarkOverlappedWindows; diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c index 5ec8502cb..e34972451 100644 --- a/mfb/mfbpixmap.c +++ b/mfb/mfbpixmap.c @@ -101,12 +101,8 @@ mfbCreatePixmap (pScreen, width, height, depth) pPixmap->drawable.height = height; pPixmap->devKind = paddedWidth; pPixmap->refcnt = 1; -#ifdef PIXPRIV pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; -#else - pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); -#endif return pPixmap; } |