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

Keith Packard keithp at keithp.com
Wed Dec 29 13:05:02 PST 2010


On Wed, 29 Dec 2010 15:04:29 +0200, ville.syrjala at nokia.com wrote:
> From: Ville Syrjälä <ville.syrjala at nokia.com>
> 
> Rename compScreenUpdate to compChildrenUpdate, and pass a window as
> the parameter. This allows an arbitrary subtree to be updated, instead
> of having to update all the windows. This will be used to make sure
> all the children have been updated when the parent window contents need
> to be accessed in IncludeInferios sub-window mode.

This change isn't right -- compWindowUpdate is already recursive, so
there's no need to walk across the children.

I'm also (vaguely) concerned about performance here -- because there's
no per-window hierarchy damage information, you'll be walking the window
sub-tree on every single operation.

It seems like a simple change would be to just clean the whole tree on
any IncludeInferiors operation so that at least a sequence of those
would only walk the tree once. That would change the code to just call
compScreenUpdate whenever CompositeUpdateWindow was called.

A more complicated change would require marking the ancestor chain with
damage on each rendering operation, stopping when you hit a window that
is already marked, and cleaning those bits when updating windows.
However, given that all of this only happens when you have automatic
redirection going on, it's hard to get that worked up about it.

-- 
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/20101229/8e1898c1/attachment.pgp>


More information about the xorg-devel mailing list