Commit slight variation of bug #5460 which is the merge of the new shadow
code from kdrive.
This commit is contained in:
parent
cfd3988ed9
commit
9148d8700b
File diff suppressed because it is too large
Load Diff
|
@ -31,6 +31,8 @@
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "damage.h"
|
||||||
|
#include "damagestr.h"
|
||||||
typedef struct _shadowBuf *shadowBufPtr;
|
typedef struct _shadowBuf *shadowBufPtr;
|
||||||
|
|
||||||
typedef void (*ShadowUpdateProc) (ScreenPtr pScreen,
|
typedef void (*ShadowUpdateProc) (ScreenPtr pScreen,
|
||||||
|
@ -47,14 +49,19 @@ typedef void *(*ShadowWindowProc) (ScreenPtr pScreen,
|
||||||
CARD32 *size,
|
CARD32 *size,
|
||||||
void *closure);
|
void *closure);
|
||||||
|
|
||||||
|
/* BC hack: do not move the damage member. see shadow.c for explanation. */
|
||||||
typedef struct _shadowBuf {
|
typedef struct _shadowBuf {
|
||||||
shadowBufPtr pNext;
|
DamagePtr pDamage;
|
||||||
ShadowUpdateProc update;
|
ShadowUpdateProc update;
|
||||||
ShadowWindowProc window;
|
ShadowWindowProc window;
|
||||||
RegionRec damage;
|
RegionRec damage;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
void *closure;
|
void *closure;
|
||||||
int randr;
|
int randr;
|
||||||
|
|
||||||
|
/* screen wrappers */
|
||||||
|
GetImageProcPtr GetImage;
|
||||||
|
CloseScreenProcPtr CloseScreen;
|
||||||
} shadowBufRec;
|
} shadowBufRec;
|
||||||
|
|
||||||
/* Match defines from randr extension */
|
/* Match defines from randr extension */
|
||||||
|
@ -68,25 +75,11 @@ 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)
|
||||||
|
|
||||||
typedef struct _shadowScrPriv {
|
|
||||||
PaintWindowBackgroundProcPtr PaintWindowBackground;
|
|
||||||
PaintWindowBorderProcPtr PaintWindowBorder;
|
|
||||||
CopyWindowProcPtr CopyWindow;
|
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
CreateGCProcPtr CreateGC;
|
|
||||||
GetImageProcPtr GetImage;
|
|
||||||
#ifdef RENDER
|
|
||||||
CompositeProcPtr Composite;
|
|
||||||
GlyphsProcPtr Glyphs;
|
|
||||||
#endif
|
|
||||||
shadowBufPtr pBuf;
|
|
||||||
BSFuncRec BackingStoreFuncs;
|
|
||||||
} shadowScrPrivRec, *shadowScrPrivPtr;
|
|
||||||
|
|
||||||
extern int shadowScrPrivateIndex;
|
extern int shadowScrPrivateIndex;
|
||||||
|
|
||||||
#define shadowGetScrPriv(pScr) ((shadowScrPrivPtr) (pScr)->devPrivates[shadowScrPrivateIndex].ptr)
|
#define shadowGetBuf(pScr) ((shadowBufPtr) (pScr)->devPrivates[shadowScrPrivateIndex].ptr)
|
||||||
#define shadowScrPriv(pScr) shadowScrPrivPtr pScrPriv = shadowGetScrPriv(pScr)
|
#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr)
|
||||||
|
#define shadowDamage(pBuf) DamageRegion(pBuf->pDamage)
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
shadowSetup (ScreenPtr pScreen);
|
shadowSetup (ScreenPtr pScreen);
|
||||||
|
@ -170,10 +163,4 @@ shadowUpdateProc shadowUpdatePlanar4Weak(void);
|
||||||
shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
|
shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
|
||||||
shadowUpdateProc shadowUpdateRotatePackedWeak(void);
|
shadowUpdateProc shadowUpdateRotatePackedWeak(void);
|
||||||
|
|
||||||
void
|
|
||||||
shadowWrapGC (GCPtr pGC);
|
|
||||||
|
|
||||||
void
|
|
||||||
shadowUnwrapGC (GCPtr pGC);
|
|
||||||
|
|
||||||
#endif /* _SHADOW_H_ */
|
#endif /* _SHADOW_H_ */
|
||||||
|
|
|
@ -43,7 +43,7 @@ void
|
||||||
shadowUpdatePacked (ScreenPtr pScreen,
|
shadowUpdatePacked (ScreenPtr pScreen,
|
||||||
shadowBufPtr pBuf)
|
shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = &pBuf->damage;
|
RegionPtr damage = shadowDamage (pBuf);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = REGION_NUM_RECTS (damage);
|
int nbox = REGION_NUM_RECTS (damage);
|
||||||
BoxPtr pbox = REGION_RECTS (damage);
|
BoxPtr pbox = REGION_RECTS (damage);
|
||||||
|
|
|
@ -89,7 +89,7 @@ void
|
||||||
shadowUpdatePlanar4 (ScreenPtr pScreen,
|
shadowUpdatePlanar4 (ScreenPtr pScreen,
|
||||||
shadowBufPtr pBuf)
|
shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = &pBuf->damage;
|
RegionPtr damage = shadowDamage (pBuf);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = REGION_NUM_RECTS (damage);
|
int nbox = REGION_NUM_RECTS (damage);
|
||||||
BoxPtr pbox = REGION_RECTS (damage);
|
BoxPtr pbox = REGION_RECTS (damage);
|
||||||
|
|
|
@ -92,7 +92,7 @@ void
|
||||||
shadowUpdatePlanar4x8 (ScreenPtr pScreen,
|
shadowUpdatePlanar4x8 (ScreenPtr pScreen,
|
||||||
shadowBufPtr pBuf)
|
shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = &pBuf->damage;
|
RegionPtr damage = shadowDamage (pBuf);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = REGION_NUM_RECTS (damage);
|
int nbox = REGION_NUM_RECTS (damage);
|
||||||
BoxPtr pbox = REGION_RECTS (damage);
|
BoxPtr pbox = REGION_RECTS (damage);
|
||||||
|
|
|
@ -53,7 +53,7 @@ void
|
||||||
shadowUpdateRotatePacked (ScreenPtr pScreen,
|
shadowUpdateRotatePacked (ScreenPtr pScreen,
|
||||||
shadowBufPtr pBuf)
|
shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = &pBuf->damage;
|
RegionPtr damage = shadowDamage (pBuf);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = REGION_NUM_RECTS (damage);
|
int nbox = REGION_NUM_RECTS (damage);
|
||||||
BoxPtr pbox = REGION_RECTS (damage);
|
BoxPtr pbox = REGION_RECTS (damage);
|
||||||
|
|
|
@ -96,7 +96,7 @@ void
|
||||||
FUNC (ScreenPtr pScreen,
|
FUNC (ScreenPtr pScreen,
|
||||||
shadowBufPtr pBuf)
|
shadowBufPtr pBuf)
|
||||||
{
|
{
|
||||||
RegionPtr damage = &pBuf->damage;
|
RegionPtr damage = shadowDamage (pBuf);
|
||||||
PixmapPtr pShadow = pBuf->pPixmap;
|
PixmapPtr pShadow = pBuf->pPixmap;
|
||||||
int nbox = REGION_NUM_RECTS (damage);
|
int nbox = REGION_NUM_RECTS (damage);
|
||||||
BoxPtr pbox = REGION_RECTS (damage);
|
BoxPtr pbox = REGION_RECTS (damage);
|
||||||
|
|
Loading…
Reference in New Issue