Commit 0f477cc6 authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Adam Jackson
Browse files

dix, composite: Optimize setting window backing store state

We hide CWBackingStore from the screen hook if nothing's actually
changing, which means compChangeWindowAttributes no longer needs to
compare the requested state with the present one.
parent 4e101e7e
......@@ -108,11 +108,11 @@ compInstallColormap(ColormapPtr pColormap)
static void
compCheckBackingStore(WindowPtr pWin)
if (pWin->backingStore != NotUseful && !pWin->backStorage) {
if (pWin->backingStore != NotUseful) {
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
pWin->backStorage = TRUE;
else if (pWin->backingStore == NotUseful && pWin->backStorage) {
else {
compUnredirectWindow(serverClient, pWin,
pWin->backStorage = FALSE;
......@@ -1328,6 +1328,12 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
client->errorValue = val;
goto PatchUp;
/* if we're not actually changing the window's state, hide
* CWBackingStore from vmaskCopy so it doesn't get passed to
* ->ChangeWindowAttributes below
if (pWin->backingStore == val)
pWin->backingStore = val;
case CWBackingPlanes:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment