aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/damageext/damageext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
commit4c61bf84b11e26e6f22648668c95ea760a379163 (patch)
tree0ac762ab2815eae283dded7447ad7cb5a54b926a /xorg-server/damageext/damageext.c
parente1dabd2ce8be0d70c6c15353b58de256129dfd1f (diff)
downloadvcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.gz
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.bz2
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.zip
xserver git update 11/6/2010
Diffstat (limited to 'xorg-server/damageext/damageext.c')
-rw-r--r--xorg-server/damageext/damageext.c21
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;