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.
This commit is contained in:
parent
4e101e7e3b
commit
0f477cc68b
|
@ -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,
|
||||
CompositeRedirectAutomatic);
|
||||
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)
|
||||
continue;
|
||||
pWin->backingStore = val;
|
||||
break;
|
||||
case CWBackingPlanes:
|
||||
|
|
Loading…
Reference in New Issue