aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/miext
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-14 06:41:54 +0000
committermarha <marha@users.sourceforge.net>2011-04-14 06:41:54 +0000
commit019fc27ce6dc2a1809107be10d4deb80e0fa436b (patch)
tree57bc2571720a5d6e518ef15879d56ea066df494c /xorg-server/miext
parent7bcdd32ccff794b9a83a88ff9bc2d0b7b088bd06 (diff)
downloadvcxsrv-019fc27ce6dc2a1809107be10d4deb80e0fa436b.tar.gz
vcxsrv-019fc27ce6dc2a1809107be10d4deb80e0fa436b.tar.bz2
vcxsrv-019fc27ce6dc2a1809107be10d4deb80e0fa436b.zip
server xkeyboard-config mesa git update 14 Apr 2011
Diffstat (limited to 'xorg-server/miext')
-rw-r--r--xorg-server/miext/damage/damage.c101
-rw-r--r--xorg-server/miext/damage/damage.h4
2 files changed, 55 insertions, 50 deletions
diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c
index 0fe1fb603..d79121165 100644
--- a/xorg-server/miext/damage/damage.c
+++ b/xorg-server/miext/damage/damage.c
@@ -121,54 +121,6 @@ getDrawableDamageRef (DrawablePtr pDrawable)
dixLookupPrivateAddr(&(pWindow)->devPrivates, damageWinPrivateKey)
static void
-damageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion)
-{
- BoxRec tmpBox;
- RegionRec tmpRegion;
- Bool was_empty;
-
- switch (pDamage->damageLevel) {
- case DamageReportRawRegion:
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
- break;
- case DamageReportDeltaRegion:
- RegionNull(&tmpRegion);
- RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
- if (RegionNotEmpty(&tmpRegion)) {
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
- }
- RegionUninit(&tmpRegion);
- break;
- case DamageReportBoundingBox:
- tmpBox = *RegionExtents(&pDamage->damage);
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage))) {
- (*pDamage->damageReport) (pDamage, &pDamage->damage,
- pDamage->closure);
- }
- break;
- case DamageReportNonEmpty:
- was_empty = !RegionNotEmpty(&pDamage->damage);
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- if (was_empty && RegionNotEmpty(&pDamage->damage)) {
- (*pDamage->damageReport) (pDamage, &pDamage->damage,
- pDamage->closure);
- }
- break;
- case DamageReportNone:
- RegionUnion(&pDamage->damage, &pDamage->damage,
- pDamageRegion);
- break;
- }
-}
-
-static void
damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pDamageRegion)
{
BoxRec tmpBox;
@@ -360,7 +312,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
/* Report damage now, if desired. */
if (!pDamage->reportAfter) {
if (pDamage->damageReport)
- damageReportDamage (pDamage, pDamageRegion);
+ DamageReportDamage (pDamage, pDamageRegion);
else
RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
@@ -393,7 +345,7 @@ damageRegionProcessPending (DrawablePtr pDrawable)
if (pDamage->reportAfter) {
/* It's possible that there is only interest in postRendering reporting. */
if (pDamage->damageReport)
- damageReportDamage (pDamage, &pDamage->pendingDamage);
+ DamageReportDamage (pDamage, &pDamage->pendingDamage);
else
RegionUnion(&pDamage->damage, &pDamage->damage,
&pDamage->pendingDamage);
@@ -2125,3 +2077,52 @@ DamageGetScreenFuncs (ScreenPtr pScreen)
damageScrPriv(pScreen);
return &pScrPriv->funcs;
}
+
+void
+DamageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion)
+{
+ BoxRec tmpBox;
+ RegionRec tmpRegion;
+ Bool was_empty;
+
+ switch (pDamage->damageLevel) {
+ case DamageReportRawRegion:
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
+ break;
+ case DamageReportDeltaRegion:
+ RegionNull(&tmpRegion);
+ RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
+ if (RegionNotEmpty(&tmpRegion)) {
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
+ }
+ RegionUninit(&tmpRegion);
+ break;
+ case DamageReportBoundingBox:
+ tmpBox = *RegionExtents(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage))) {
+ (*pDamage->damageReport) (pDamage, &pDamage->damage,
+ pDamage->closure);
+ }
+ break;
+ case DamageReportNonEmpty:
+ was_empty = !RegionNotEmpty(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ if (was_empty && RegionNotEmpty(&pDamage->damage)) {
+ (*pDamage->damageReport) (pDamage, &pDamage->damage,
+ pDamage->closure);
+ }
+ break;
+ case DamageReportNone:
+ RegionUnion(&pDamage->damage, &pDamage->damage,
+ pDamageRegion);
+ break;
+ }
+}
+
diff --git a/xorg-server/miext/damage/damage.h b/xorg-server/miext/damage/damage.h
index 067016f38..0c7fc316c 100644
--- a/xorg-server/miext/damage/damage.h
+++ b/xorg-server/miext/damage/damage.h
@@ -110,6 +110,10 @@ DamageRegionProcessPending (DrawablePtr pDrawable);
extern _X_EXPORT void
DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion);
+/* Call this when you create a new Damage and you wish to send an initial damage message (to it). */
+extern _X_EXPORT void
+DamageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion);
+
/* Avoid using this call, it only exists for API compatibility. */
extern _X_EXPORT void
DamageDamageRegion (DrawablePtr pDrawable,