remove PIXPRIV checks as this flag is always set.
This commit is contained in:
parent
024bbc7cbb
commit
a7cd53deb9
23
Xext/shm.c
23
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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 ;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue