Implement core protocol backing store exclusively in terms of Composite.
Composite's automatic redirection is a more general mechanism than the ad-hoc BS machinery, so it's much prettier to implement the one in terms of the other. Composite now wraps ChangeWindowAttributes and activates automatic redirection for windows with backing store requested. The old backing store infrastructure is completely gutted: ABI-visible structures retain the function pointers, but they never get called, and all the open-coded conditionals throughout the DIX layer to implement BS are gone. Note that this is still not a strictly complete implementation of backing store, since Composite will throw the bits away on unmap and therefore WhenMapped and Always hints are equivalent.
This commit is contained in:
@@ -1114,7 +1114,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||
WindowPtr pChild;
|
||||
Bool WasViewable = (Bool)(pWin->viewable);
|
||||
Bool anyMarked = FALSE;
|
||||
RegionPtr pOldClip = NULL, bsExposed;
|
||||
RegionPtr pOldClip = NULL;
|
||||
#ifdef DO_SAVE_UNDERS
|
||||
Bool dosave = FALSE;
|
||||
#endif
|
||||
@@ -1175,12 +1175,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||
|
||||
if (WasViewable)
|
||||
{
|
||||
if (pWin->backStorage)
|
||||
{
|
||||
pOldClip = REGION_CREATE(pScreen, NullBox, 1);
|
||||
REGION_COPY(pScreen, pOldClip, &pWin->clipList);
|
||||
}
|
||||
|
||||
if (pWin->firstChild)
|
||||
{
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
|
||||
@@ -1204,28 +1198,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
|
||||
}
|
||||
|
||||
if (pWin->backStorage &&
|
||||
((pWin->backingStore == Always) || WasViewable))
|
||||
{
|
||||
if (!WasViewable)
|
||||
pOldClip = &pWin->clipList; /* a convenient empty region */
|
||||
bsExposed = (*pScreen->TranslateBackingStore)
|
||||
(pWin, 0, 0, pOldClip,
|
||||
pWin->drawable.x, pWin->drawable.y);
|
||||
if (WasViewable)
|
||||
REGION_DESTROY(pScreen, pOldClip);
|
||||
if (bsExposed)
|
||||
{
|
||||
RegionPtr valExposed = NullRegion;
|
||||
|
||||
if (pWin->valdata)
|
||||
valExposed = &pWin->valdata->after.exposed;
|
||||
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
|
||||
if (valExposed)
|
||||
REGION_EMPTY(pScreen, valExposed);
|
||||
REGION_DESTROY(pScreen, bsExposed);
|
||||
}
|
||||
}
|
||||
if (WasViewable)
|
||||
{
|
||||
if (anyMarked)
|
||||
|
||||
Reference in New Issue
Block a user