From ae9d0ce9ba91b9ba1a4f7ec4dc3fccd35992ef66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 23 Jul 2009 10:15:17 -0400 Subject: [PATCH] Only do pageflipping when the window isn't redirected --- hw/xfree86/dri2/dri2.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index ee857ebdb..7b9fb23aa 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -347,21 +347,20 @@ static Bool DRI2FlipCheck(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; - WindowPtr pWin; - PixmapPtr pWinPixmap; + WindowPtr pWin, pRoot; + PixmapPtr pWinPixmap, pRootPixmap; if (pDraw->type == DRAWABLE_PIXMAP) return TRUE; + pRoot = WindowTable[pScreen->myNum]; + pRootPixmap = pScreen->GetWindowPixmap(pRoot); + pWin = (WindowPtr) pDraw; pWinPixmap = pScreen->GetWindowPixmap(pWin); - if (pDraw->width != pWinPixmap->drawable.width) + if (pRootPixmap != pWinPixmap) return FALSE; - if (pDraw->height != pWinPixmap->drawable.height) - return FALSE; - if (pDraw->depth != pWinPixmap->drawable.depth) - return FALSE; - if (!REGION_EQUAL(pScreen, &pWin->clipList, &pWin->winSize)) + if (!REGION_EQUAL(pScreen, &pWin->clipList, &pRoot->winSize)) return FALSE; return TRUE;