aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-17 16:16:11 +0200
committermarha <marha@users.sourceforge.net>2012-09-17 16:16:11 +0200
commitc72f683c50e774b21967f0121245a286539fa555 (patch)
treefa5e86f04a33b8bcebf937d1966052ccf1fefbeb /xorg-server/hw
parent86fb7e4a298199b30bd16565569a9b3dfe7a1f11 (diff)
parente3c4aa34268f99562e66b43a7d9efcd16ca072e6 (diff)
downloadvcxsrv-c72f683c50e774b21967f0121245a286539fa555.tar.gz
vcxsrv-c72f683c50e774b21967f0121245a286539fa555.tar.bz2
vcxsrv-c72f683c50e774b21967f0121245a286539fa555.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/main/syncobj.h pixman/pixman/pixman-mmx.c
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c74
1 files changed, 42 insertions, 32 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 23f589cdc..40963c3b0 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -766,6 +766,44 @@ static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable)
}
}
+/*
+ * A TraverseTree callback to invalidate all windows using the same
+ * pixmap
+ */
+static int
+DRI2InvalidateWalk(WindowPtr pWin, pointer data)
+{
+ if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data)
+ return WT_DONTWALKCHILDREN;
+ DRI2InvalidateDrawable(&pWin->drawable);
+ return WT_WALKCHILDREN;
+}
+
+static void
+DRI2InvalidateDrawableAll(DrawablePtr pDraw)
+{
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ WindowPtr pWin = (WindowPtr) pDraw;
+ PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin);
+
+ /*
+ * Find the top-most window using this pixmap
+ */
+ while (pWin->parent &&
+ pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap)
+ pWin = pWin->parent;
+
+ /*
+ * Walk the sub-tree to invalidate all of the
+ * windows using the same pixmap
+ */
+ TraverseTree(pWin, DRI2InvalidateWalk, pPixmap);
+ DRI2InvalidateDrawable(&pPixmap->drawable);
+ }
+ else
+ DRI2InvalidateDrawable(pDraw);
+}
+
DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
{
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
@@ -831,6 +869,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
spix->screen_x = mpix->screen_x;
spix->screen_y = mpix->screen_y;
#endif
+
+ DRI2InvalidateDrawableAll(pDraw);
return &spix->drawable;
}
@@ -1048,18 +1088,7 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable)
return FALSE;
}
-/*
- * A TraverseTree callback to invalidate all windows using the same
- * pixmap
- */
-static int
-DRI2InvalidateWalk(WindowPtr pWin, pointer data)
-{
- if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data)
- return WT_DONTWALKCHILDREN;
- DRI2InvalidateDrawable(&pWin->drawable);
- return WT_WALKCHILDREN;
-}
+
int
DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
@@ -1162,26 +1191,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
*/
*swap_target = pPriv->swap_count + pPriv->swapsPending;
- if (pDraw->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr) pDraw;
- PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin);
-
- /*
- * Find the top-most window using this pixmap
- */
- while (pWin->parent &&
- pScreen->GetWindowPixmap(pWin->parent) == pPixmap)
- pWin = pWin->parent;
-
- /*
- * Walk the sub-tree to invalidate all of the
- * windows using the same pixmap
- */
- TraverseTree(pWin, DRI2InvalidateWalk, pPixmap);
- DRI2InvalidateDrawable(&pPixmap->drawable);
- }
- else
- DRI2InvalidateDrawable(pDraw);
+ DRI2InvalidateDrawableAll(pDraw);
return Success;
}