diff options
Diffstat (limited to 'xorg-server/hw/dmx/dmxpixmap.c')
-rw-r--r-- | xorg-server/hw/dmx/dmxpixmap.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/xorg-server/hw/dmx/dmxpixmap.c b/xorg-server/hw/dmx/dmxpixmap.c index bcbcc3a88..119dd1134 100644 --- a/xorg-server/hw/dmx/dmxpixmap.c +++ b/xorg-server/hw/dmx/dmxpixmap.c @@ -49,7 +49,7 @@ /** Initialize a private area in \a pScreen for pixmap information. */
Bool dmxInitPixmap(ScreenPtr pScreen)
{
- if (!dixRequestPrivate(dmxPixPrivateKey, sizeof(dmxPixPrivRec)))
+ if (!dixRegisterPrivateKey(&dmxPixPrivateKeyRec, PRIVATE_PIXMAP, sizeof(dmxPixPrivRec)))
return FALSE;
return TRUE;
@@ -174,8 +174,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap) dmxSync(dmxScreen, FALSE);
}
}
- dixFreePrivates(pPixmap->devPrivates);
- free(pPixmap);
+ FreePixmap(pPixmap);
#if 0
if (pScreen->DestroyPixmap)
@@ -190,8 +189,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap) * pPixmap. */
RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
+ DMXScreenInfo *dmxScreen = &dmxScreens[pPixmap->drawable.pScreen->myNum];
dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
XImage *ximage;
RegionPtr pReg, pTmpReg;
@@ -201,7 +199,7 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) Bool overlap;
if (!dmxScreen->beDisplay) {
- pReg = REGION_CREATE(pScreen, NullBox, 1);
+ pReg = RegionCreate(NullBox, 1);
return pReg;
}
@@ -209,8 +207,8 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) pPixmap->drawable.width, pPixmap->drawable.height,
1, XYPixmap);
- pReg = REGION_CREATE(pScreen, NullBox, 1);
- pTmpReg = REGION_CREATE(pScreen, NullBox, 1);
+ pReg = RegionCreate(NullBox, 1);
+ pTmpReg = RegionCreate(NullBox, 1);
if(!pReg || !pTmpReg) {
XDestroyImage(ximage);
return NullRegion;
@@ -229,8 +227,8 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) } else if (currentPixel == 0L) {
/* right edge */
Box.x2 = x;
- REGION_RESET(pScreen, pTmpReg, &Box);
- REGION_APPEND(pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
}
previousPixel = currentPixel;
}
@@ -238,16 +236,16 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) if (previousPixel != 0L) {
/* right edge because of the end of pixmap */
Box.x2 = pPixmap->drawable.width;
- REGION_RESET(pScreen, pTmpReg, &Box);
- REGION_APPEND(pScreen, pReg, pTmpReg);
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
}
}
- REGION_DESTROY(pScreen, pTmpReg);
+ RegionDestroy(pTmpReg);
XDestroyImage(ximage);
- REGION_VALIDATE(pScreen, pReg, &overlap);
+ RegionValidate(pReg, &overlap);
dmxSync(dmxScreen, FALSE);
- return(pReg);
+ return pReg;
}
|