[PATCH] composite: only update window contents when using automatic redirection

Keith Packard keithp at keithp.com
Wed Sep 8 10:05:39 PDT 2010


On Wed, 08 Sep 2010 11:40:51 -0400, Adam Jackson <ajax at nwnk.net> wrote:
> On Tue, 2010-09-07 at 14:43 -0700, Keith Packard wrote:
> > On Tue, 7 Sep 2010 12:48:32 -0700, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> > 
> > > Brian pointed this out awhile back but the fix was never merged.  So
> > > here's a real patch.  Would be nice to get into 1.9.x as well if it
> > > proves ok in master.
> > 
> > Looks like there are additional optimizations available here -- we're
> > doing a full tree traversal per block handler whenever anything is
> > damaged. Can the 'damage' boolean in both screen and window be
> > restricted to Automatic update mode?
> 
> cs->damaged would need to be set for any automatic updates on the
> screen, but otherwise I think the answer is yes.

Ok, looking at the code in more depth -- cs->damaged and cw->damaged are
set in compReportDamage, which is called whenever the damage structure
allocated for Automatic compositing is changed. So, in the absence of
Automatic compositing, they shouldn't ever get set. Which means that
compWindowUpdateAutomatic shouldn't ever get called on windows which
don't have Automatic redirection. Which makes me wonder why Jesse's
change has any effect at all.

> Is there a reason why compWindowUpdate isn't a call to TraverseTree?  I
> always feel nervous when I see manual tree walks, particularly when
> TraverseTree tries so hard to not be recursive.

That still seems like a good change to me.

-- 
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/20100908/8641f854/attachment.pgp>


More information about the xorg-devel mailing list