From 327e1d88012102af6aca6c6840aa0ed3c7041a77 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Mon, 28 Mar 2011 17:18:39 +0200 Subject: EXA: Use dixGetPrivate(Addr) instead of dixLookupPrivate. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The latter calls the former, let's cut the middle man and eliminate a branch in a hot path. According to Git history, ExaSetPixmapPriv was never used anywhere, just drop it. Signed-off-by: Michel Dänzer Reviewed-by: Cyril Brulebois Signed-off-by: Keith Packard --- exa/exa_priv.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'exa') diff --git a/exa/exa_priv.h b/exa/exa_priv.h index e5d90d468..70de4bd6f 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -228,10 +228,10 @@ extern DevPrivateKeyRec exaPixmapPrivateKeyRec; extern DevPrivateKeyRec exaGCPrivateKeyRec; #define exaGCPrivateKey (&exaGCPrivateKeyRec) -#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey)) +#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixGetPrivate(&(s)->devPrivates, exaScreenPrivateKey)) #define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) -#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixLookupPrivate(&(gc)->devPrivates, exaGCPrivateKey)) +#define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixGetPrivateAddr(&(gc)->devPrivates, exaGCPrivateKey)) #define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc) /* @@ -282,8 +282,7 @@ extern DevPrivateKeyRec exaGCPrivateKeyRec; #define EXA_PIXMAP_SCORE_PINNED 1000 #define EXA_PIXMAP_SCORE_INIT 1001 -#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) #define EXA_RANGE_PITCH (1 << 0) -- cgit v1.2.3