From: Adel Gadllah <[email protected]>
Date: Sun, 17 Oct 2010 19:42:17 +0200
Subject: [PATCH] Skip unnecessary operations when moving a manually
redirected window

Moving a manually redirected window does not affect the parent's clip
region, so we can skip a bunch of operations which can be potentially expensive.
---
 mi/miwindow.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/mi/miwindow.c b/mi/miwindow.c
index dc5d21a..9e59ae8 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -267,6 +267,17 @@ miMoveWindow(WindowPtr pWin, int x, int y,
WindowPtr pNextSib, VTKind kind)
     /* if this is a root window, can't be moved */
     if (!(pParent = pWin->parent))
        return ;
+
+#ifdef COMPOSITE
+    /*
+     * Manually redirected windows don't affect the parent's clip
+     * region, so skip the unnecessary and possible expensive
+     * operations
+     */
+    if (pWin->redirectDraw == RedirectDrawManual)
+        WasViewable = FALSE;
+#endif
+
     pScreen = pWin->drawable.pScreen;
     bw = wBorderWidth (pWin);

-- 
1.7.2.3
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to