summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-07-23 10:15:17 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-10-29 14:05:10 -0700
commitae9d0ce9ba91b9ba1a4f7ec4dc3fccd35992ef66 (patch)
treed84f07bb38de9797e485e4e882e4d94d5e42538b
parentf2cdca03e3b8e470dd6739cadee147e81e8a95db (diff)
Only do pageflipping when the window isn't redirected
-rw-r--r--hw/xfree86/dri2/dri2.c15
1 files 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)
- return FALSE;
- if (pDraw->height != pWinPixmap->drawable.height)
- return FALSE;
- if (pDraw->depth != pWinPixmap->drawable.depth)
+ if (pRootPixmap != pWinPixmap)
return FALSE;
- if (!REGION_EQUAL(pScreen, &pWin->clipList, &pWin->winSize))
+ if (!REGION_EQUAL(pScreen, &pWin->clipList, &pRoot->winSize))
return FALSE;
return TRUE;