[PATCH 2/4] composite: Support updating an arbitrary subtree

Daniel Stone daniel at fooishbar.org
Wed Dec 29 05:21:15 PST 2010


Hi,

On Wed, Dec 29, 2010 at 03:04:29PM +0200, ville.syrjala at nokia.com wrote:
>  static void
> -compScreenUpdate (ScreenPtr pScreen)
> +compChildrenUpdate (WindowPtr pWin)
>  {
> -    CompScreenPtr   cs = GetCompScreen (pScreen);
> +    ScreenPtr pScreen = pWin->drawable.pScreen;
> +    CompScreenPtr cs = GetCompScreen (pScreen);
>  
>      compCheckTree (pScreen);
> -    if (cs->damaged)
> -    {
> -	compWindowUpdate (pScreen->root);
> -	cs->damaged = FALSE;
> +    if (cs->damaged) {
> +	WindowPtr pChild;
> +
> +	for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib)
> +	    compWindowUpdate (pChild);
> +
> +	if (pWin == pScreen->root)
> +	    cs->damaged = FALSE;

compWindowUpdate walks all the children itself, so you should be able to
replace the for loop with a simple compWindowUpdate(pWin).

Other than that, it looks fine to me, so for the series:
Reviewed-by: Daniel Stone <daniel at fooishbar.org>

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101229/2c5691b3/attachment.pgp>


More information about the xorg-devel mailing list