[PATCH xserver 7/7] composite: Implement backing store's Always mode
Keith Packard
keithp at keithp.com
Tue Jul 24 21:18:48 UTC 2018
Adam Jackson <ajax at redhat.com> writes:
> +static Bool
> +backed(WindowPtr pWin)
> +{
> + for (; pWin; pWin = pWin->parent)
> + if (pWin->backStorage)
> + return TRUE;
> +
> + return FALSE;
> +}
> +
Do we need to stop if we find another redirection layer? I think that
will break the backing store which may exist above that point?
> Bool
> compUnrealizeWindow(WindowPtr pWin)
> {
> @@ -284,12 +296,36 @@ compUnrealizeWindow(WindowPtr pWin)
> compCheckRedirect(pWin);
> if (!(*pScreen->UnrealizeWindow) (pWin))
> ret = FALSE;
> +
> + /* UnrealizeTree walks from root to leaves, so only need to check parent */
> + if (backed(pWin) && pWin->parent->paintable)
> + pWin->paintable = TRUE;
> +
Presumably paintable has been set to false in DIX? Having composite not
integrated into DIX is starting to suck too much?
> +void
> +compWindowExposures(WindowPtr pWin, RegionPtr reg)
> +{
> + ScreenPtr pScreen = pWin->drawable.pScreen;
> + CompScreenPtr cs = GetCompScreen(pScreen);
> +
> + pScreen->WindowExposures = cs->WindowExposures;
> +
> + if (pWin->backStorage) {
> + DamageDamageRegion(&pWin->drawable, reg);
> + RegionEmpty(reg);
> + }
> +
> + pScreen->WindowExposures(pWin, reg);
> +
> + cs->WindowExposures = pScreen->WindowExposures;
> + pScreen->WindowExposures = compWindowExposures;
> +}
Why is this needed? WindowExposures should get set correctly if we're
setting the regions in miValidateTree?
> + /*
> + * Take down bs explicitly, to get ->backStorage cleared
> + */
> + if (pWin->backingStore != NotUseful) {
> + pWin->backingStore = NotUseful;
> + pScreen->ChangeWindowAttributes(pWin, CWBackingStore);
> + }
> +
This seems like it shouldn't be necessary; destroying a window with
backStorage set should be cleaned up already? Or is it only ever cleared
in unmap at this point?
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180724/364d4317/attachment.sig>
More information about the xorg-devel
mailing list