[PATCH] composite: Convert compWindowUpdate to use TraverseTree
Adam Jackson
ajax at redhat.com
Wed Sep 8 13:02:58 PDT 2010
On Wed, 2010-09-08 at 12:35 -0700, Keith Packard wrote:
> > -void
> > -compWindowUpdate (WindowPtr pWin)
> > +static int
> > +compWindowUpdateVisit(WindowPtr pWin, void *data)
> > {
> > - WindowPtr pChild;
> > -
> > - for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib)
> > - compWindowUpdate (pChild);
> > - if (pWin->redirectDraw != RedirectDrawNone)
> > + if (pWin->redirectDraw == RedirectDrawAutomatic)
>
> This should not be necessary; I'd love to see proof that it changes what
> the server does.
Yeah, I think you're correct. I'm running with gnome-shell and have a
breakpoint set on compWindowUpdate, and it's never getting hit.
> > {
> > - CompWindowPtr cw = GetCompWindow(pWin);
> > -
> > + CompWindowPtr cw = GetCompWindow(pWin);
> > if (cw->damaged)
> > - {
> > - compWindowUpdateAutomatic (pWin);
> > - cw->damaged = FALSE;
> > - }
> > + compWindowUpdateAutomatic(pWin, data);
> > + cw->damaged = FALSE;
>
> We've already tested for this; no reason to dirty the cache line; you're
> not saving a branch.
That's the sort of thing I would expect the compiler to know for me, but
fair enough.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100908/2db53d2e/attachment.pgp>
More information about the xorg-devel
mailing list