From c8607ca66f1bf798f03dbf0b51539298fc5cf09a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 30 Sep 2024 17:57:05 +0200 Subject: [PATCH] render: 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 Part-of: --- render/glyph.c | 4 ++-- render/mipict.c | 2 +- render/picture.c | 2 +- render/render.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/render/glyph.c b/render/glyph.c index 57aa46789..30f423742 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -608,7 +608,7 @@ miGlyphs(CARD8 op, maskFormat, CPComponentAlpha, &component_alpha, serverClient, &error); if (!pMask) { - (*pScreen->DestroyPixmap) (pMaskPixmap); + dixDestroyPixmap(pMaskPixmap, 0); return; } pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen); @@ -676,7 +676,7 @@ miGlyphs(CARD8 op, xSrc + x - xDst, ySrc + y - yDst, 0, 0, x, y, width, height); FreePicture((void *) pMask, (XID) 0); - (*pScreen->DestroyPixmap) (pMaskPixmap); + dixDestroyPixmap(pMaskPixmap, 0); } } diff --git a/render/mipict.c b/render/mipict.c index ac376eb71..0bc5417c6 100644 --- a/render/mipict.c +++ b/render/mipict.c @@ -67,7 +67,7 @@ miChangePictureClip(PicturePtr pPicture, int type, void *value, int n) clientClip = BitmapToRegion(pScreen, (PixmapPtr) value); if (!clientClip) return BadAlloc; - (*pScreen->DestroyPixmap) ((PixmapPtr) value); + dixDestroyPixmap((PixmapPtr) value, 0); break; case CT_REGION: clientClip = value; diff --git a/render/picture.c b/render/picture.c index 1126eb97e..feb29a7d7 100644 --- a/render/picture.c +++ b/render/picture.c @@ -1416,7 +1416,7 @@ FreePicture(void *value, XID pid) } } else if (pPicture->pDrawable->type == DRAWABLE_PIXMAP) { - (*pScreen->DestroyPixmap) ((PixmapPtr) pPicture->pDrawable); + dixDestroyPixmap((PixmapPtr) pPicture->pDrawable, 0); } } dixFreeObjectWithPrivates(pPicture, PRIVATE_PICTURE); diff --git a/render/render.c b/render/render.c index 27dfa38ad..113f6e0c5 100644 --- a/render/render.c +++ b/render/render.c @@ -1137,7 +1137,7 @@ ProcRenderAddGlyphs(ClientPtr client) /* The picture takes a reference to the pixmap, so we drop ours. */ - (pScreen->DestroyPixmap) (pDstPix); + dixDestroyPixmap(pDstPix, 0); pDstPix = NULL; if (!pDst) { @@ -1542,7 +1542,7 @@ ProcRenderCreateCursor(ClientPtr client) free(mskbits); return error; } - (*pScreen->DestroyPixmap) (pPixmap); + dixDestroyPixmap(pPixmap, 0); CompositePicture(PictOpSrc, pSrc, 0, pPicture, 0, 0, 0, 0, 0, 0, width, height); (*pScreen->GetImage) (pPicture->pDrawable,