mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
remove PIXPRIV checks as this flag is always set.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user