diff options
author | marha <marha@users.sourceforge.net> | 2010-06-11 14:16:16 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-11 14:16:16 +0000 |
commit | d1e4f4b8546c7955c66dd023bfd6ef437db9d21d (patch) | |
tree | 529985e77bfc95aa95fe5b540e8f42b0ef041206 /xorg-server/damageext/damageext.c | |
parent | 13919cf85a6ca41d97238de13344aba59e0f7680 (diff) | |
parent | 4c61bf84b11e26e6f22648668c95ea760a379163 (diff) | |
download | vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.gz vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.bz2 vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.zip |
svn merge ^/branches/released .
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;
|