On Son, 2011-03-27 at 04:41 +0200, Cyril Brulebois wrote: 
> (Mode I'm-discovering-the-code on)
> 
> Michel Dänzer <[email protected]> (26/03/2011):
> > From: Michel Dänzer <[email protected]>
> > 
> > The latter calls the former, let's cut the middle man and eliminate a branch
> > in a hot path.
> > 
> > Signed-off-by: Michel Dänzer <[email protected]>
> 
> Since we have:
>   dixRegisterPrivateKey(&exaScreenPrivateKeyRec, PRIVATE_SCREEN, 0)
>   #define exaScreenPrivateKey (&exaScreenPrivateKeyRec)
> and others with sizeof() instead…
> 
> it looks like we're indeed in the right branch of dixLookupPrivate()'s
> if() in all cases, so that looks fine.
> 
> Reviewed-by: Cyril Brulebois <[email protected]>

Thanks.


> > -#define ExaGetPixmapPriv(p) 
> > ((ExaPixmapPrivPtr)dixLookupPrivate(&(p)->devPrivates, exaPixmapPrivateKey))
> > -#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, 
> > exaPixmapPrivateKey, a)
> > +#define ExaGetPixmapPriv(p) 
> > ((ExaPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, 
> > exaPixmapPrivateKey))
> >  #define ExaPixmapPriv(p)   ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p
> 
> (Might be worth noting removing ExaSetPixmapPriv() is intended as it's
> unused, for those who wouldn't be looking at the actual (inexistent)
> callers in the current code. But not a prerequisite to my r-b.)

I didn't feel the need for this, as the patch wouldn't build if it was
used. But I guess it can't hurt to add something.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
[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