[PATCH] Skip unnecessary operations when moving a manually redirected window
Adel Gadllah
adel.gadllah at gmail.com
Sun Oct 17 10:53:50 PDT 2010
From: Adel Gadllah <adel.gadllah at gmail.com>
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
More information about the xorg-devel
mailing list