On Wed, Dec 29, 2010 at 01:21:15PM +0000, ext Daniel Stone wrote:
> Hi,
> 
> On Wed, Dec 29, 2010 at 03:04:29PM +0200, [email protected] wrote:
> >  static void
> > -compScreenUpdate (ScreenPtr pScreen)
> > +compChildrenUpdate (WindowPtr pWin)
> >  {
> > -    CompScreenPtr   cs = GetCompScreen (pScreen);
> > +    ScreenPtr pScreen = pWin->drawable.pScreen;
> > +    CompScreenPtr cs = GetCompScreen (pScreen);
> >  
> >      compCheckTree (pScreen);
> > -    if (cs->damaged)
> > -    {
> > -   compWindowUpdate (pScreen->root);
> > -   cs->damaged = FALSE;
> > +    if (cs->damaged) {
> > +   WindowPtr pChild;
> > +
> > +   for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib)
> > +       compWindowUpdate (pChild);
> > +
> > +   if (pWin == pScreen->root)
> > +       cs->damaged = FALSE;
> 
> compWindowUpdate walks all the children itself, so you should be able to
> replace the for loop with a simple compWindowUpdate(pWin).

compWindowUpdate would cause pWin contents to be copied to it's parent.
That'd be unnecessary work at this point.

-- 
Ville Syrjälä
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to