miext/shadow: Remove ancient backwards-compatibility hack

Here's a trip down memory lane.  Back when we merged kdrive we adopted
kdrive's version of shadow, which used damage directly instead of
hand-rolling it.  However a couple of Xorg drivers referred to the
accumulated damage region in the shadow private directly, so I added a
hack to copy the damage region around.

That was 9148d8700b, back in early 2006.
Eight years is unusually patient for me.  The neomagic and trident drivers
were still relying on this, but they've been modified to ask the damage
code for the region instead.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2014-02-28 15:36:31 -05:00
parent 35eabf2e52
commit cf4793d99e
2 changed files with 0 additions and 36 deletions

View File

@ -93,8 +93,6 @@ shadowGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
wrap(pBuf, pScreen, GetImage);
}
#define BACKWARDS_COMPATIBILITY
static Bool
shadowCloseScreen(ScreenPtr pScreen)
{
@ -104,35 +102,12 @@ shadowCloseScreen(ScreenPtr pScreen)
unwrap(pBuf, pScreen, CloseScreen);
shadowRemove(pScreen, pBuf->pPixmap);
DamageDestroy(pBuf->pDamage);
#ifdef BACKWARDS_COMPATIBILITY
RegionUninit(&pBuf->damage); /* bc */
#endif
if (pBuf->pPixmap)
pScreen->DestroyPixmap(pBuf->pPixmap);
free(pBuf);
return pScreen->CloseScreen(pScreen);
}
#ifdef BACKWARDS_COMPATIBILITY
static void
shadowReportFunc(DamagePtr pDamage, RegionPtr pRegion, void *closure)
{
ScreenPtr pScreen = closure;
shadowBufPtr pBuf = (shadowBufPtr)
dixLookupPrivate(&pScreen->devPrivates, shadowScrPrivateKey);
/* Register the damaged region, use DamageReportNone below when we
* want to break BC below... */
RegionUnion(&pDamage->damage, &pDamage->damage, pRegion);
/*
* BC hack. In 7.0 and earlier several drivers would inspect the
* 'damage' member directly, so we have to keep it existing.
*/
RegionCopy(&pBuf->damage, pRegion);
}
#endif
Bool
shadowSetup(ScreenPtr pScreen)
{
@ -147,15 +122,9 @@ shadowSetup(ScreenPtr pScreen)
pBuf = malloc(sizeof(shadowBufRec));
if (!pBuf)
return FALSE;
#ifdef BACKWARDS_COMPATIBILITY
pBuf->pDamage = DamageCreate((DamageReportFunc) shadowReportFunc,
(DamageDestroyFunc) NULL,
DamageReportRawRegion, TRUE, pScreen, pScreen);
#else
pBuf->pDamage = DamageCreate((DamageReportFunc) NULL,
(DamageDestroyFunc) NULL,
DamageReportNone, TRUE, pScreen, pScreen);
#endif
if (!pBuf->pDamage) {
free(pBuf);
return FALSE;
@ -168,9 +137,6 @@ shadowSetup(ScreenPtr pScreen)
pBuf->pPixmap = 0;
pBuf->closure = 0;
pBuf->randr = 0;
#ifdef BACKWARDS_COMPATIBILITY
RegionNull(&pBuf->damage); /* bc */
#endif
dixSetPrivate(&pScreen->devPrivates, shadowScrPrivateKey, pBuf);
return TRUE;

View File

@ -43,12 +43,10 @@ typedef void *(*ShadowWindowProc) (ScreenPtr pScreen,
CARD32 offset,
int mode, CARD32 *size, void *closure);
/* BC hack: do not move the damage member. see shadow.c for explanation. */
typedef struct _shadowBuf {
DamagePtr pDamage;
ShadowUpdateProc update;
ShadowWindowProc window;
RegionRec damage;
PixmapPtr pPixmap;
void *closure;
int randr;