diff options
author | Adam Jackson <ajax@redhat.com> | 2016-12-09 14:52:37 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-12-12 14:10:44 -0500 |
commit | 8d985c1e696bf46edaea0021f03f6f613ce37860 (patch) | |
tree | de503e20b55d12458ffc3fadedaf0e9434f47948 /miext | |
parent | a530dc2a62349d922de77a75786a3795102aec11 (diff) | |
download | xserver-8d985c1e696bf46edaea0021f03f6f613ce37860.tar.gz |
shadow: Macro cleanup
shadowDamage is just obfuscation. The other two macros won't work
outside shadow.c since the private key is in fact static there (meaning
the extern decl is a lie).
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'miext')
-rw-r--r-- | miext/shadow/sh3224.c | 2 | ||||
-rw-r--r-- | miext/shadow/shadow.c | 5 | ||||
-rw-r--r-- | miext/shadow/shadow.h | 7 | ||||
-rw-r--r-- | miext/shadow/shafb4.c | 2 | ||||
-rw-r--r-- | miext/shadow/shafb8.c | 2 | ||||
-rw-r--r-- | miext/shadow/shiplan2p4.c | 2 | ||||
-rw-r--r-- | miext/shadow/shiplan2p8.c | 2 | ||||
-rw-r--r-- | miext/shadow/shpacked.c | 2 | ||||
-rw-r--r-- | miext/shadow/shplanar.c | 2 | ||||
-rw-r--r-- | miext/shadow/shplanar8.c | 2 | ||||
-rw-r--r-- | miext/shadow/shrotate.c | 2 | ||||
-rw-r--r-- | miext/shadow/shrotpack.h | 2 | ||||
-rw-r--r-- | miext/shadow/shrotpackYX.h | 2 |
13 files changed, 15 insertions, 19 deletions
diff --git a/miext/shadow/sh3224.c b/miext/shadow/sh3224.c index ba541217e..5d8f27482 100644 --- a/miext/shadow/sh3224.c +++ b/miext/shadow/sh3224.c @@ -100,7 +100,7 @@ sh24_32BltLine(CARD8 *srcLine, void shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c index b8e23dae6..529402d6e 100644 --- a/miext/shadow/shadow.c +++ b/miext/shadow/shadow.c @@ -37,9 +37,12 @@ #include "shadow.h" static DevPrivateKeyRec shadowScrPrivateKeyRec; - #define shadowScrPrivateKey (&shadowScrPrivateKeyRec) +#define shadowGetBuf(pScr) ((shadowBufPtr) \ + dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey)) +#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr) + #define wrap(priv, real, mem) {\ priv->mem = real->mem; \ real->mem = shadow##mem; \ diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h index c9a4100c4..b8cd1b5c1 100644 --- a/miext/shadow/shadow.h +++ b/miext/shadow/shadow.h @@ -68,13 +68,6 @@ typedef struct _shadowBuf { #define SHADOW_REFLECT_Y 32 #define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y) -extern _X_EXPORT DevPrivateKey shadowScrPrivateKey; - -#define shadowGetBuf(pScr) ((shadowBufPtr) \ - dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey)) -#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr) -#define shadowDamage(pBuf) DamageRegion(pBuf->pDamage) - extern _X_EXPORT Bool shadowSetup(ScreenPtr pScreen); diff --git a/miext/shadow/shafb4.c b/miext/shadow/shafb4.c index d88ae1c2c..ae59e2d32 100644 --- a/miext/shadow/shafb4.c +++ b/miext/shadow/shafb4.c @@ -80,7 +80,7 @@ static inline void store_afb4(void *dst, unsigned int stride, void shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shafb8.c b/miext/shadow/shafb8.c index 8d84bfa01..d2b73fc64 100644 --- a/miext/shadow/shafb8.c +++ b/miext/shadow/shafb8.c @@ -84,7 +84,7 @@ static inline void store_afb8(void *dst, unsigned int stride, void shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shiplan2p4.c b/miext/shadow/shiplan2p4.c index 0e46bae7a..f37c58d71 100644 --- a/miext/shadow/shiplan2p4.c +++ b/miext/shadow/shiplan2p4.c @@ -78,7 +78,7 @@ static inline void store_iplan2p4(void *dst, const CARD32 d[2]) void shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shiplan2p8.c b/miext/shadow/shiplan2p8.c index 17d6a132e..44cb8d336 100644 --- a/miext/shadow/shiplan2p8.c +++ b/miext/shadow/shiplan2p8.c @@ -79,7 +79,7 @@ static inline void store_iplan2p8(void *dst, const CARD32 d[4]) void shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c index 34527bcc7..5220854c1 100644 --- a/miext/shadow/shpacked.c +++ b/miext/shadow/shpacked.c @@ -43,7 +43,7 @@ void shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shplanar.c b/miext/shadow/shplanar.c index cb5fc54c8..92c7971d2 100644 --- a/miext/shadow/shplanar.c +++ b/miext/shadow/shplanar.c @@ -89,7 +89,7 @@ void shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shplanar8.c b/miext/shadow/shplanar8.c index 214fa9aac..412335940 100644 --- a/miext/shadow/shplanar8.c +++ b/miext/shadow/shplanar8.c @@ -92,7 +92,7 @@ void shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shrotate.c b/miext/shadow/shrotate.c index 7dc471fe2..174553788 100644 --- a/miext/shadow/shrotate.c +++ b/miext/shadow/shrotate.c @@ -51,7 +51,7 @@ void shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shrotpack.h b/miext/shadow/shrotpack.h index b1cb30d5c..4814991f0 100644 --- a/miext/shadow/shrotpack.h +++ b/miext/shadow/shrotpack.h @@ -96,7 +96,7 @@ void FUNC(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); diff --git a/miext/shadow/shrotpackYX.h b/miext/shadow/shrotpackYX.h index f3df6c549..3c5b3a122 100644 --- a/miext/shadow/shrotpackYX.h +++ b/miext/shadow/shrotpackYX.h @@ -56,7 +56,7 @@ void FUNC(ScreenPtr pScreen, shadowBufPtr pBuf) { - RegionPtr damage = shadowDamage(pBuf); + RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); |