diff options
Diffstat (limited to 'xorg-server/damageext/damageext.c')
-rw-r--r-- | xorg-server/damageext/damageext.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/xorg-server/damageext/damageext.c b/xorg-server/damageext/damageext.c index dc9c2e8e2..fb60e7f72 100644 --- a/xorg-server/damageext/damageext.c +++ b/xorg-server/damageext/damageext.c @@ -32,10 +32,8 @@ static int DamageEventBase; static RESTYPE DamageExtType;
static RESTYPE DamageExtWinType;
-static int DamageClientPrivateKeyIndex;
-static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKeyIndex;
-
-#define prScreen screenInfo.screens[0]
+static DevPrivateKeyRec DamageClientPrivateKeyRec;
+#define DamageClientPrivateKey (&DamageClientPrivateKeyRec)
static void
DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes)
@@ -94,10 +92,10 @@ DamageExtReport (DamagePtr pDamage, RegionPtr pRegion, void *closure) switch (pDamageExt->level) {
case DamageReportRawRegion:
case DamageReportDeltaRegion:
- DamageExtNotify (pDamageExt, REGION_RECTS(pRegion), REGION_NUM_RECTS(pRegion));
+ DamageExtNotify (pDamageExt, RegionRects(pRegion), RegionNumRects(pRegion));
break;
case DamageReportBoundingBox:
- DamageExtNotify (pDamageExt, REGION_EXTENTS(prScreen, pRegion), 1);
+ DamageExtNotify (pDamageExt, RegionExtents(pRegion), 1);
break;
case DamageReportNonEmpty:
DamageExtNotify (pDamageExt, NullBox, 0);
@@ -261,14 +259,14 @@ ProcDamageSubtract (ClientPtr client) if (pRepair)
{
if (pParts)
- REGION_INTERSECT (prScreen, pParts, DamageRegion (pDamage), pRepair);
+ RegionIntersect(pParts, DamageRegion (pDamage), pRepair);
if (DamageSubtract (pDamage, pRepair))
DamageExtReport (pDamage, DamageRegion (pDamage), (void *) pDamageExt);
}
else
{
if (pParts)
- REGION_COPY (prScreen, pParts, DamageRegion (pDamage));
+ RegionCopy(pParts, DamageRegion (pDamage));
DamageEmpty (pDamage);
}
}
@@ -293,9 +291,9 @@ ProcDamageAdd (ClientPtr client) /* The region is relative to the drawable origin, so translate it out to
* screen coordinates like damage expects.
*/
- REGION_TRANSLATE(pScreen, pRegion, pDrawable->x, pDrawable->y);
+ RegionTranslate(pRegion, pDrawable->x, pDrawable->y);
DamageRegionAppend(pDrawable, pRegion);
- REGION_TRANSLATE(pScreen, pRegion, -pDrawable->x, -pDrawable->y);
+ RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y);
return Success;
}
@@ -502,8 +500,9 @@ DamageExtensionInit(void) if (!DamageExtWinType)
return;
- if (!dixRequestPrivate(DamageClientPrivateKey, sizeof (DamageClientRec)))
+ if (!dixRegisterPrivateKey(&DamageClientPrivateKeyRec, PRIVATE_CLIENT, sizeof (DamageClientRec)))
return;
+
if (!AddCallback (&ClientStateCallback, DamageClientCallback, 0))
return;
|