On Jan 14, 2011, at 8:44 AM, Pauli wrote:

> @@ -1151,8 +1149,7 @@ xf86XVPostValidateTree(WindowPtr pWin, WindowPtr 
> pLayerWin, VTKind kind)
>     if (ScreenPriv->PostValidateTree) {
>       pScreen->PostValidateTree = ScreenPriv->PostValidateTree;
>       (*pScreen->PostValidateTree)(pWin, pLayerWin, kind);
> -     ScreenPriv->PostValidateTree = pScreen->PostValidateTree;
> -     pScreen->PostValidateTree = xf86XVPostValidateTree;
> +     ScreenPriv->PostValidateTree = NULL;
>     }
> }
> 
> @@ -1178,6 +1175,11 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
> 
>      pPriv->clipChanged = TRUE;
> 
> +     if (!ScreenPriv->PostValidateTree) {
> +        ScreenPriv->PostValidateTree = pScreen->PostValidateTree;
> +        pScreen->PostValidateTree = xf86XVPostValidateTree;
> +     }
> +
>      WinPriv = WinPriv->next;
>   }
> 

I see what you're going for here but I'm a little nervous about this.  If some
other layer wanted to rewrite the window tree without Xv knowing about it, they
would have to know to unwrap/rewrap PostValidateTree around the calldown to
ClipNotify.  That seems wrong, I can't think of any other examples where we
break layering like that.

- ajax



_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to