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>
This commit is contained in:
parent
a530dc2a62
commit
8d985c1e69
|
@ -520,7 +520,7 @@ winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
winScreenPriv(pScreen);
|
winScreenPriv(pScreen);
|
||||||
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
HRESULT ddrval = DD_OK;
|
HRESULT ddrval = DD_OK;
|
||||||
RECT rcDest, rcSrc;
|
RECT rcDest, rcSrc;
|
||||||
POINT ptOrigin;
|
POINT ptOrigin;
|
||||||
|
|
|
@ -434,7 +434,7 @@ winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
winScreenPriv(pScreen);
|
winScreenPriv(pScreen);
|
||||||
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
DWORD dwBox = RegionNumRects(damage);
|
DWORD dwBox = RegionNumRects(damage);
|
||||||
BoxPtr pBox = RegionRects(damage);
|
BoxPtr pBox = RegionRects(damage);
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
|
|
|
@ -100,7 +100,7 @@ sh24_32BltLine(CARD8 *srcLine,
|
||||||
void
|
void
|
||||||
shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -37,9 +37,12 @@
|
||||||
#include "shadow.h"
|
#include "shadow.h"
|
||||||
|
|
||||||
static DevPrivateKeyRec shadowScrPrivateKeyRec;
|
static DevPrivateKeyRec shadowScrPrivateKeyRec;
|
||||||
|
|
||||||
#define shadowScrPrivateKey (&shadowScrPrivateKeyRec)
|
#define shadowScrPrivateKey (&shadowScrPrivateKeyRec)
|
||||||
|
|
||||||
|
#define shadowGetBuf(pScr) ((shadowBufPtr) \
|
||||||
|
dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey))
|
||||||
|
#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr)
|
||||||
|
|
||||||
#define wrap(priv, real, mem) {\
|
#define wrap(priv, real, mem) {\
|
||||||
priv->mem = real->mem; \
|
priv->mem = real->mem; \
|
||||||
real->mem = shadow##mem; \
|
real->mem = shadow##mem; \
|
||||||
|
|
|
@ -68,13 +68,6 @@ typedef struct _shadowBuf {
|
||||||
#define SHADOW_REFLECT_Y 32
|
#define SHADOW_REFLECT_Y 32
|
||||||
#define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y)
|
#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
|
extern _X_EXPORT Bool
|
||||||
shadowSetup(ScreenPtr pScreen);
|
shadowSetup(ScreenPtr pScreen);
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ static inline void store_afb4(void *dst, unsigned int stride,
|
||||||
void
|
void
|
||||||
shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -84,7 +84,7 @@ static inline void store_afb8(void *dst, unsigned int stride,
|
||||||
void
|
void
|
||||||
shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -78,7 +78,7 @@ static inline void store_iplan2p4(void *dst, const CARD32 d[2])
|
||||||
void
|
void
|
||||||
shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -79,7 +79,7 @@ static inline void store_iplan2p8(void *dst, const CARD32 d[4])
|
||||||
void
|
void
|
||||||
shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
void
|
void
|
||||||
shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
void
|
void
|
||||||
shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
void
|
void
|
||||||
shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
void
|
void
|
||||||
shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
|
shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
void
|
void
|
||||||
FUNC(ScreenPtr pScreen, shadowBufPtr pBuf)
|
FUNC(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
void
|
void
|
||||||
FUNC(ScreenPtr pScreen, shadowBufPtr pBuf)
|
FUNC(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = shadowDamage(pBuf);
|
RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = RegionNumRects(damage);
|
int nbox = RegionNumRects(damage);
|
||||||
BoxPtr pbox = RegionRects(damage);
|
BoxPtr pbox = RegionRects(damage);
|
||||||
|
|
Loading…
Reference in New Issue