use dixDestroyPixmap() instead of direct driver call

Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead.

See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/merge_requests/15>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-10-01 17:23:44 +02:00
committed by Marge Bot
parent 6228d9a88c
commit bc21fcdffa
2 changed files with 4 additions and 4 deletions

View File

@@ -324,11 +324,11 @@ R128Done(PixmapPtr pPixmap)
info->state_2d.in_use = FALSE; info->state_2d.in_use = FALSE;
#if defined(R128DRI) && defined(RENDER) #if defined(R128DRI) && defined(RENDER)
if (info->state_2d.src_pix) { if (info->state_2d.src_pix) {
pScreen->DestroyPixmap(info->state_2d.src_pix); dixDestroyPixmap(info->state_2d.src_pix, 0);
info->state_2d.src_pix = NULL; info->state_2d.src_pix = NULL;
} }
if (info->state_2d.msk_pix) { if (info->state_2d.msk_pix) {
pScreen->DestroyPixmap(info->state_2d.msk_pix); dixDestroyPixmap(info->state_2d.msk_pix, 0);
info->state_2d.msk_pix = NULL; info->state_2d.msk_pix = NULL;
} }
#endif #endif

View File

@@ -108,7 +108,7 @@ R128SolidPixmap(ScreenPtr pScreen, uint32_t solid)
exaMoveInPixmap(pPix); exaMoveInPixmap(pPix);
if (!exaDrawableIsOffscreen(&pPix->drawable)) { if (!exaDrawableIsOffscreen(&pPix->drawable)) {
pScreen->DestroyPixmap(pPix); dixDestroyPixmap(pPix, 0);
return NULL; return NULL;
} }
info->ExaDriver->WaitMarker(pScreen, 0); info->ExaDriver->WaitMarker(pScreen, 0);
@@ -459,7 +459,7 @@ R128CCEPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
pMask = R128SolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); pMask = R128SolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
if (!pMask) { if (!pMask) {
if (!pSrcPicture->pDrawable) if (!pSrcPicture->pDrawable)
pScreen->DestroyPixmap(pSrc); dixDestroyPixmap(pSrc, 0);
info->state_2d.has_mask = FALSE; info->state_2d.has_mask = FALSE;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Failed to create " "Failed to create "