|
|
5766b0 |
From c2c9450bc7b324e58ea6b77d0d7e1d2d18f35646 Mon Sep 17 00:00:00 2001
|
|
|
5766b0 |
From: Adam Jackson <ajax@redhat.com>
|
|
|
5766b0 |
Date: Tue, 30 Jul 2019 21:26:49 -0400
|
|
|
5766b0 |
Subject: [PATCH xserver] dix: Optimize setting backing store state
|
|
|
5766b0 |
|
|
|
5766b0 |
Extra special RHEL 7.7+ edition
|
|
|
5766b0 |
---
|
|
|
5766b0 |
composite/compinit.c | 15 +++++----------
|
|
|
5766b0 |
dix/window.c | 6 ++++++
|
|
|
5766b0 |
2 files changed, 11 insertions(+), 10 deletions(-)
|
|
|
5766b0 |
|
|
|
5766b0 |
diff --git a/composite/compinit.c b/composite/compinit.c
|
|
|
5766b0 |
index 2a4de4a22..149f354a6 100644
|
|
|
5766b0 |
--- a/composite/compinit.c
|
|
|
5766b0 |
+++ b/composite/compinit.c
|
|
|
5766b0 |
@@ -120,20 +120,15 @@ compCheckBackingStore(WindowPtr pWin)
|
|
|
5766b0 |
(pWin->backingStore == Always) ||
|
|
|
5766b0 |
(pWin->backingStore == WhenMapped && pWin->viewable);
|
|
|
5766b0 |
|
|
|
5766b0 |
- if (should && !pWin->backStorage) {
|
|
|
5766b0 |
+ if (should) {
|
|
|
5766b0 |
compCheckPaintable(pWin);
|
|
|
5766b0 |
- if (Success == compRedirectWindow(serverClient, pWin,
|
|
|
5766b0 |
- CompositeRedirectAutomatic))
|
|
|
5766b0 |
- pWin->backStorage = TRUE;
|
|
|
5766b0 |
+ compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
|
|
|
5766b0 |
}
|
|
|
5766b0 |
- else if (!should && pWin->backStorage) {
|
|
|
5766b0 |
+ else if (!should) {
|
|
|
5766b0 |
compCheckPaintable(pWin);
|
|
|
5766b0 |
- if (Success == compUnredirectWindow(serverClient, pWin,
|
|
|
5766b0 |
- CompositeRedirectAutomatic))
|
|
|
5766b0 |
- pWin->backStorage = FALSE;
|
|
|
5766b0 |
+ compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
|
|
|
5766b0 |
}
|
|
|
5766b0 |
- pWin->paintable = pWin->viewable ||
|
|
|
5766b0 |
- (pWin->backingStore == Always && pWin->backStorage);
|
|
|
5766b0 |
+ compCheckPaintable(pWin); /* XXX before and after? really? */
|
|
|
5766b0 |
}
|
|
|
5766b0 |
|
|
|
5766b0 |
/* Fake backing store via automatic redirection */
|
|
|
5766b0 |
diff --git a/dix/window.c b/dix/window.c
|
|
|
5766b0 |
index 34bed93d9..30ae5db89 100644
|
|
|
5766b0 |
--- a/dix/window.c
|
|
|
5766b0 |
+++ b/dix/window.c
|
|
|
5766b0 |
@@ -1342,6 +1342,12 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
|
|
5766b0 |
client->errorValue = val;
|
|
|
5766b0 |
goto PatchUp;
|
|
|
5766b0 |
}
|
|
|
5766b0 |
+ /* if we're not actually changing the window's state, hide
|
|
|
5766b0 |
+ * CWBackingStore from vmaskCopy so it doesn't get passed to
|
|
|
5766b0 |
+ * ->ChangeWindowAttributes below
|
|
|
5766b0 |
+ */
|
|
|
5766b0 |
+ if (pWin->backingStore == val)
|
|
|
5766b0 |
+ continue;
|
|
|
5766b0 |
pWin->backingStore = val;
|
|
|
5766b0 |
pWin->forcedBS = FALSE;
|
|
|
5766b0 |
break;
|
|
|
5766b0 |
--
|
|
|
5766b0 |
2.21.0
|
|
|
5766b0 |
|