Revert "dbe: use dixDestroyPixmap() instead of direct driver call"

This reverts commit 668d9fc40e.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2020>
This commit is contained in:
Alan Coopersmith 2025-06-11 17:44:28 -07:00 committed by Marge Bot
parent b91182cc16
commit f0d6ec1c8a

View File

@ -162,7 +162,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction)
(*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width,
pDbeWindowPriv->height,
pWin->drawable.depth, 0))) {
dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
(*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
return BadAlloc;
}
@ -426,11 +426,14 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
*/
/* Destroy the front and back pixmaps. */
if (pDbeWindowPriv->pFrontBuffer)
dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
if (pDbeWindowPriv->pBackBuffer)
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
if (pDbeWindowPriv->pFrontBuffer) {
(*pDbeWindowPriv->pWindow->drawable.pScreen->
DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
}
if (pDbeWindowPriv->pBackBuffer) {
(*pDbeWindowPriv->pWindow->drawable.pScreen->
DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
}
} /* miDbeWinPrivDelete() */
/******************************************************************************
@ -582,8 +585,13 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
if (!pFrontBuffer || !pBackBuffer) {
/* We failed at creating 1 or 2 of the pixmaps. */
dixDestroyPixmap(pFrontBuffer, 0);
dixDestroyPixmap(pBackBuffer, 0);
if (pFrontBuffer) {
(*pScreen->DestroyPixmap) (pFrontBuffer);
}
if (pBackBuffer) {
(*pScreen->DestroyPixmap) (pBackBuffer);
}
/* Destroy all buffers for this window. */
while (pDbeWindowPriv) {
@ -634,8 +642,8 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
* pixmaps.
*/
dixDestroyPixmap(pDbeWindowPriv->pFrontBuffer, 0);
dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0);
(*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer);
(*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer);
pDbeWindowPriv->pFrontBuffer = pFrontBuffer;
pDbeWindowPriv->pBackBuffer = pBackBuffer;