diff --git a/mi/miarc.c b/mi/miarc.c index 3223bcb02..9ea4a6155 100644 --- a/mi/miarc.c +++ b/mi/miarc.c @@ -1112,7 +1112,7 @@ miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs) out: if (fTricky) { - dixDestroyPixmap((PixmapPtr) pDrawTo, 0); + (*pGCTo->pScreen->DestroyPixmap) ((PixmapPtr) pDrawTo); FreeScratchGC(pGCTo); } } diff --git a/mi/midispcur.c b/mi/midispcur.c index 401e16768..305b6fc68 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -119,11 +119,12 @@ miDCSwitchScreenCursor(ScreenPtr pScreen, CursorPtr pCursor, PixmapPtr sourceBit { miDCScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); - dixDestroyPixmap(pScreenPriv->sourceBits, 0); + if (pScreenPriv->sourceBits) + (*pScreen->DestroyPixmap)(pScreenPriv->sourceBits); pScreenPriv->sourceBits = sourceBits; if (pScreenPriv->maskBits) - dixDestroyPixmap(pScreenPriv->maskBits, 0); + (*pScreen->DestroyPixmap)(pScreenPriv->maskBits); pScreenPriv->maskBits = maskBits; if (pScreenPriv->pPicture) @@ -202,7 +203,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor) pGC = GetScratchGC(32, pScreen); if (!pGC) { - dixDestroyPixmap(pPixmap, 0); + (*pScreen->DestroyPixmap) (pPixmap); return FALSE; } ValidateGC(&pPixmap->drawable, pGC); @@ -213,7 +214,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor) FreeScratchGC(pGC); pPicture = CreatePicture(0, &pPixmap->drawable, pFormat, 0, 0, serverClient, &error); - dixDestroyPixmap(pPixmap, 0); + (*pScreen->DestroyPixmap) (pPixmap); if (!pPicture) return FALSE; @@ -229,7 +230,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor) maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); if (!maskBits) { - dixDestroyPixmap(sourceBits, 0); + (*pScreen->DestroyPixmap) (sourceBits); return FALSE; } @@ -237,8 +238,8 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor) pGC = GetScratchGC(1, pScreen); if (!pGC) { - dixDestroyPixmap(sourceBits, 0); - dixDestroyPixmap(maskBits, 0); + (*pScreen->DestroyPixmap) (sourceBits); + (*pScreen->DestroyPixmap) (maskBits); return FALSE; } @@ -394,7 +395,8 @@ miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, pSave = pBuffer->pSave; pWin = pScreen->root; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) { - dixDestroyPixmap(pSave, 0); + if (pSave) + (*pScreen->DestroyPixmap) (pSave); pBuffer->pSave = pSave = (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0); if (!pSave) @@ -511,7 +513,8 @@ miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) * is freed when that root window is destroyed, so don't * free it again here. */ - dixDestroyPixmap(pBuffer->pSave, 0); + if (pBuffer->pSave) + (*pScreen->DestroyPixmap) (pBuffer->pSave); free(pBuffer); dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, diff --git a/mi/migc.c b/mi/migc.c index 14389b0f5..e4f3b547e 100644 --- a/mi/migc.c +++ b/mi/migc.c @@ -63,7 +63,7 @@ miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) if (type == CT_PIXMAP) { /* convert the pixmap to a region */ pGC->clientClip = BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue); - dixDestroyPixmap(pvalue, 0); + (*pGC->pScreen->DestroyPixmap) (pvalue); } else if (type == CT_REGION) { /* stuff the region in the GC */ diff --git a/mi/miglblt.c b/mi/miglblt.c index accd55ffe..4314b4091 100644 --- a/mi/miglblt.c +++ b/mi/miglblt.c @@ -118,7 +118,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp pGCtmp = GetScratchGC(1, pDrawable->pScreen); if (!pGCtmp) { - dixDestroyPixmap(pPixmap, 0); + (*pDrawable->pScreen->DestroyPixmap) (pPixmap); return; } @@ -132,7 +132,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp nbyLine = BitmapBytePad(width); pbits = xallocarray(height, nbyLine); if (!pbits) { - dixDestroyPixmap(pPixmap, 0); + (*pDrawable->pScreen->DestroyPixmap) (pPixmap); FreeScratchGC(pGCtmp); return; } @@ -174,7 +174,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp } x += pci->metrics.characterWidth; } - dixDestroyPixmap(pPixmap, 0); + (*pDrawable->pScreen->DestroyPixmap) (pPixmap); free(pbits); FreeScratchGC(pGCtmp); } diff --git a/mi/miscrinit.c b/mi/miscrinit.c index 1372cf754..cf67baab0 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -125,8 +125,7 @@ miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, static Bool miCloseScreen(ScreenPtr pScreen) { - dixDestroyPixmap((PixmapPtr) pScreen->devPrivate, 0); - return TRUE; + return ((*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate)); } static Bool