mirror of
https://github.com/X11Libre/xf86-video-omap.git
synced 2026-03-24 01:24:23 +00:00
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-omap/-/merge_requests/9>
This commit is contained in:
@@ -258,10 +258,8 @@ OMAPDRI2CreateBuffer(DrawablePtr pDraw, unsigned int attachment,
|
||||
PixmapPtr pNewPix = createpix(pDraw, TRUE);
|
||||
|
||||
// TODO copy contents..
|
||||
|
||||
OMAPPixmapExchange(pPixmap, pNewPix);
|
||||
|
||||
pScreen->DestroyPixmap(pNewPix);
|
||||
dixDestroyPixmap(pNewPix, 0);
|
||||
}
|
||||
|
||||
pPixmap->refcnt++;
|
||||
@@ -320,7 +318,7 @@ OMAPDRI2DestroyBuffer(DrawablePtr pDraw, DRI2BufferPtr buffer)
|
||||
if (buffer->attachment == DRI2BufferFrontLeft && buf->pPixmap->refcnt)
|
||||
buf->pPixmap->refcnt--;
|
||||
else
|
||||
pScreen->DestroyPixmap(buf->pPixmap);
|
||||
dixDestroyPixmap(buf->pPixmap, 0);
|
||||
|
||||
free(buf);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ setupplane(ScreenPtr pScreen, PixmapPtr pSrcPix, int width, int height,
|
||||
|
||||
if (pSrcPix && ((pSrcPix->drawable.height != height) ||
|
||||
(pSrcPix->drawable.width != width))) {
|
||||
pScreen->DestroyPixmap(pSrcPix);
|
||||
dixDestroyPixmap(pSrcPix, 0);
|
||||
pSrcPix = NULL;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ freebufs(ScreenPtr pScreen, OMAPPortPrivPtr pPriv)
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(pPriv->pSrcPix); i++) {
|
||||
if (pPriv->pSrcPix[i])
|
||||
pScreen->DestroyPixmap(pPriv->pSrcPix[i]);
|
||||
dixDestroyPixmap(pPriv->pSrcPix[i], 0);
|
||||
pPriv->pSrcPix[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user