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