[PATCH v2 4/6] composite: Add SourceValidate wrapper

Keith Packard keithp at keithp.com
Fri Dec 31 13:42:16 PST 2010


On Fri, 31 Dec 2010 16:49:37 +0200, ville.syrjala at nokia.com wrote:
> From: Ville Syrjälä <ville.syrjala at nokia.com>
> 
> When SourceValidate is performed on a window with IncludeInferiors
> sub-window mode, force an immediate update of all the automatically
> redirected windows, so that the current window contents will be up
> to date.

Reviewed-by: Keith Packard <keithp at keithp.com>

> +    pScreen->SourceValidate = cs->SourceValidate;
> +    if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors)
> +	compScreenUpdate (pScreen);
> +    if (pScreen->SourceValidate)
> +	(*pScreen->SourceValidate) (pDrawable, x, y, width, height,
> +				    subWindowMode);
> +    cs->SourceValidate = pScreen->SourceValidate;
> +    pScreen->SourceValidate = compSourceValidate;

This looks a bit tricky -- unwrapping SourceValidate before calling
compScreenUpdate seems like the right order, but I wouldn't mind a nice
comment here as it's not the 'usual' order of operations for wrapping functions.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101231/a685ccb7/attachment.pgp>


More information about the xorg-devel mailing list