dri2: declare variables where needed in DRI2CanFlip()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-06 13:00:33 +01:00
committed by Enrico Weigelt
parent a790d65210
commit 01f62a1b49

View File

@@ -921,17 +921,15 @@ Bool
DRI2CanFlip(DrawablePtr pDraw)
{
ScreenPtr pScreen = pDraw->pScreen;
WindowPtr pWin, pRoot;
PixmapPtr pWinPixmap, pRootPixmap;
if (pDraw->type == DRAWABLE_PIXMAP)
return TRUE;
pRoot = pScreen->root;
pRootPixmap = pScreen->GetWindowPixmap(pRoot);
WindowPtr pRoot = pScreen->root;
PixmapPtr pRootPixmap = pScreen->GetWindowPixmap(pRoot);
pWin = (WindowPtr) pDraw;
pWinPixmap = pScreen->GetWindowPixmap(pWin);
WindowPtr pWin = (WindowPtr) pDraw;
PixmapPtr pWinPixmap = pScreen->GetWindowPixmap(pWin);
if (pRootPixmap != pWinPixmap)
return FALSE;
if (!RegionEqual(&pWin->clipList, &pRoot->winSize))