summaryrefslogtreecommitdiff
path: root/hw/xnest/Pixmap.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
commitd568221710959cf7d783e6ff0fb80fb43a231124 (patch)
tree8d6f039393294c6ffac8533639afdebe5d68bfc1 /hw/xnest/Pixmap.c
parent9508a382f8a9f241dab097d921b6d290c1c3a776 (diff)
Diffstat (limited to 'hw/xnest/Pixmap.c')
-rw-r--r--hw/xnest/Pixmap.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 51180a4f5..f93dcac52 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Pixmap.c,v 3.6 2003/01/10 13:29:40 eich Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "miscstruct.h"
@@ -26,7 +28,11 @@ is" without express or implied warranty.
#include "Display.h"
#include "Screen.h"
-#include "Pixmap.h"
+#include "XNPixmap.h"
+
+#ifdef PIXPRIV
+int xnestPixmapPrivateIndex;
+#endif
PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
ScreenPtr pScreen;
@@ -36,7 +42,7 @@ PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
{
PixmapPtr pPixmap;
- pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + sizeof(xnestPrivPixmap));
+ pPixmap = AllocatePixmap(pScreen, sizeof(xnestPrivPixmap));
if (!pPixmap)
return NullPixmap;
pPixmap->drawable.type = DRAWABLE_PIXMAP;
@@ -52,7 +58,12 @@ PixmapPtr xnestCreatePixmap(pScreen, width, height, 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,
@@ -82,7 +93,6 @@ RegionPtr xnestPixmapToRegion(pPixmap)
register int x, y;
unsigned long previousPixel, currentPixel;
BoxRec Box;
- int nWidth;
Bool overlap;
ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,