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

Ville Syrjälä ville.syrjala at nokia.com
Fri Dec 31 08:11:45 PST 2010


On Thu, Dec 30, 2010 at 10:34:22AM -0800, ext Keith Packard wrote:
> On Thu, 30 Dec 2010 14:56:19 +0200, Ville Syrjälä <ville.syrjala at nokia.com> wrote:
> > On Wed, Dec 29, 2010 at 01:05:02PM -0800, ext Keith Packard wrote:
> > > 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 wanted to avoid the copy from pWin to it's parent,
> 
> Probably cleaner to fix compWindowUpdate to just not do that then, which
> would be easily done by passing pWin as the 'data' parameter to
> TraverseTree and simply skipping that window in compWindowUpdateVisit.

TraverseTree is the wrong thing to use here. See my v2 patchset for
details.

> > Right. I was thinking about making cs->damaged into a counter, but that
> > would still cause needless tree walks if the damaged windows are in a
> > different subtree. So yeah, marking the ancestors would be the best
> > choice. I'll take a look at doing that.
> 
> I'd like to have the simpler fix now and the more complicated fix
> later; that way we can separate the bug fix from the optimization.

Done in v2.

-- 
Ville Syrjälä


More information about the xorg-devel mailing list