[PATCH] dix: Remove a large pile of backing store leftovers

Adam Jackson ajax at nwnk.net
Wed May 19 08:42:10 PDT 2010


On Tue, 2010-05-18 at 15:27 -0700, Keith Packard wrote:
> On Tue, 18 May 2010 17:57:31 -0400, Adam Jackson <ajax at redhat.com> wrote:
> > Since we're breaking ScreenRec, might as well break it good and hard.
> 
> Looking good to me. Should change backStorage into a boolean instead of
> a pointer now too -- it's only used in compinit.c.

Just a bit in the long bitfield list in WindowRec?  No reason to burn a
whole int on it.  Although we're remarkably close to running over an int
there too.

> >  void
> >  miInitializeBackingStore (ScreenPtr pScreen)
> >  {
> > -    pScreen->SaveDoomedAreas = NULL;
> > -    pScreen->RestoreAreas = NULL;
> > -    pScreen->ExposeCopy = NULL;
> > -    pScreen->TranslateBackingStore = NULL;
> > -    pScreen->ClearBackingStore = NULL;
> > -    pScreen->DrawGuarantee = NULL;
> >  }
> 
> Can we remove this function? It hasn't done anything useful for a long
> time.

I bet we can macro it away in the autoconf for the drivers, sure.
Something like this might work:

AC_CHECK_DECL(miInitializeBackingStore,
              [],
              [AC_DEFINE(miInitializeBackingStore())],
              [#include "mibstore.h"])

Dan or Gaetan or some other autoconf wizard feel like checking my work
there?

> > @@ -40,8 +40,7 @@ typedef union _Validate {
> >  	DDXPointRec	oldAbsCorner;	/* old window position */
> >  	RegionPtr	borderVisible;	/* visible region of border, */
> >  					/* non-null when size changes */
> > -	Bool		resized;	/* unclipped winSize has changed - */
> > -					/* don't call SaveDoomedAreas */
> > +	Bool		resized;	/* unclipped winSize has changed */
> 
> You can get rid of 'resized' here, except that rootless validate still
> uses it for unknown reasons, I suspect it should be using borderVisible
> != NULL?

Context:

    /*
     * One last thing: backing storage. We have to try to save what parts of
     * the window are about to be obscured. We can just subtract the universe
     * from the old clipList and get the areas that were in the old but aren't
     * in the new and, hence, are about to be obscured.
     */
    if (pParent->backStorage && !resized)
        REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe);

borderVisible is only set if border width is not 0 or we're shaped, so I
don't think it's equivalent to 'resized'.  But, given how the Composite
version of BS works, and assuming the coment is accurate, I think this
stanza is unnecessary; there's no "preserving" the bits before
obscuration, they're preserved a priori, so we don't need to compute
what to preserve.  And we don't anyway; we're removing the call to
SaveDoomedAreas, so there's nothing to pass the modified parent clip to.

I apparently deleted the corresponding stanza from miValidateTree in
ae7f71a.  I'm not sure why I didn't hit miext/rootless then too.

- 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/20100519/4b4a03bb/attachment.pgp>


More information about the xorg-devel mailing list