diff options
author | Adam Jackson <ajax@redhat.com> | 2013-08-21 11:57:24 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2013-09-10 14:28:53 -0400 |
commit | c90add0f1ce0c85aea7a60635de765848d778266 (patch) | |
tree | 44a321666237ca509bef9d218657836239705e16 /miext | |
parent | 0f3f8e4295d4c05f33b93e0ffd2f6f8cd5759bf7 (diff) |
damage: Remove "post-rendering" hooks
This is a revert of 974db58f5b730c3770ee461665a02dd4334d1dea. There are
no consumers of this API, we must not need it.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'miext')
-rw-r--r-- | miext/damage/damage.c | 83 | ||||
-rw-r--r-- | miext/damage/damage.h | 18 | ||||
-rw-r--r-- | miext/damage/damagestr.h | 3 |
3 files changed, 2 insertions, 102 deletions
diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 0fef53f15..cc0299143 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -119,51 +119,6 @@ getDrawableDamageRef(DrawablePtr pDrawable) DamagePtr *pPrev = (DamagePtr *) \ dixLookupPrivateAddr(&(pWindow)->devPrivates, damageWinPrivateKey) -static void -damageReportDamagePostRendering(DamagePtr pDamage, RegionPtr pOldDamage, - RegionPtr pDamageRegion) -{ - BoxRec tmpBox; - RegionRec tmpRegion, newDamage; - Bool was_empty; - - RegionUnion(&newDamage, pOldDamage, pDamageRegion); - - switch (pDamage->damageLevel) { - case DamageReportRawRegion: - (*pDamage->damageReportPostRendering) (pDamage, pDamageRegion, - pDamage->closure); - break; - case DamageReportDeltaRegion: - RegionNull(&tmpRegion); - RegionSubtract(&tmpRegion, pDamageRegion, pOldDamage); - if (RegionNotEmpty(&tmpRegion)) { - (*pDamage->damageReportPostRendering) (pDamage, &tmpRegion, - pDamage->closure); - } - RegionUninit(&tmpRegion); - break; - case DamageReportBoundingBox: - tmpBox = *RegionExtents(pOldDamage); - if (!BOX_SAME(&tmpBox, RegionExtents(&newDamage))) { - (*pDamage->damageReportPostRendering) (pDamage, &newDamage, - pDamage->closure); - } - break; - case DamageReportNonEmpty: - was_empty = !RegionNotEmpty(pOldDamage); - if (was_empty && RegionNotEmpty(&newDamage)) { - (*pDamage->damageReportPostRendering) (pDamage, &newDamage, - pDamage->closure); - } - break; - case DamageReportNone: - break; - } - - RegionUninit(&newDamage); -} - #if DAMAGE_DEBUG_ENABLE static void _damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, @@ -299,14 +254,10 @@ damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, RegionTranslate(pDamageRegion, -draw_x, -draw_y); /* Store damage region if needed after submission. */ - if (pDamage->reportAfter || pDamage->damageMarker) + if (pDamage->reportAfter) RegionUnion(&pDamage->pendingDamage, &pDamage->pendingDamage, pDamageRegion); - /* Duplicate current damage if needed. */ - if (pDamage->damageMarker) - RegionCopy(&pDamage->backupDamage, &pDamage->damage); - /* Report damage now, if desired. */ if (!pDamage->reportAfter) { if (pDamage->damageReport) @@ -335,12 +286,6 @@ damageRegionProcessPending(DrawablePtr pDrawable) drawableDamage(pDrawable); for (; pDamage != NULL; pDamage = pDamage->pNext) { - /* submit damage marker whenever possible. */ - if (pDamage->damageMarker) - (*pDamage->damageMarker) (pDrawable, pDamage, - &pDamage->backupDamage, - &pDamage->pendingDamage, - pDamage->closure); if (pDamage->reportAfter) { /* It's possible that there is only interest in postRendering reporting. */ if (pDamage->damageReport) @@ -350,10 +295,8 @@ damageRegionProcessPending(DrawablePtr pDrawable) &pDamage->pendingDamage); } - if (pDamage->reportAfter || pDamage->damageMarker) + if (pDamage->reportAfter) RegionEmpty(&pDamage->pendingDamage); - if (pDamage->damageMarker) - RegionEmpty(&pDamage->backupDamage); } } @@ -1762,9 +1705,7 @@ DamageCreate(DamageReportFunc damageReport, pDamage->reportAfter = FALSE; pDamage->damageReport = damageReport; - pDamage->damageReportPostRendering = NULL; pDamage->damageDestroy = damageDestroy; - pDamage->damageMarker = NULL; pDamage->pScreen = pScreen; (*pScrPriv->funcs.Create) (pDamage); @@ -1936,17 +1877,6 @@ DamageRegionProcessPending(DrawablePtr pDrawable) damageRegionProcessPending(pDrawable); } -/* If a damage marker is provided, then this function must be called after rendering is done. */ -/* Please do call back so any future enhancements can assume this function is called. */ -/* There are no strict timing requirements for calling this function, just as soon as (is cheaply) possible. */ -void -DamageRegionRendered(DrawablePtr pDrawable, DamagePtr pDamage, - RegionPtr pOldDamage, RegionPtr pRegion) -{ - if (pDamage->damageReportPostRendering) - damageReportDamagePostRendering(pDamage, pOldDamage, pRegion); -} - /* This call is very odd, i'm leaving it intact for API sake, but please don't use it. */ void DamageDamageRegion(DrawablePtr pDrawable, RegionPtr pRegion) @@ -1966,15 +1896,6 @@ DamageSetReportAfterOp(DamagePtr pDamage, Bool reportAfter) pDamage->reportAfter = reportAfter; } -void -DamageSetPostRenderingFunctions(DamagePtr pDamage, - DamageReportFunc damageReportPostRendering, - DamageMarkerFunc damageMarker) -{ - pDamage->damageReportPostRendering = damageReportPostRendering; - pDamage->damageMarker = damageMarker; -} - DamageScreenFuncsPtr DamageGetScreenFuncs(ScreenPtr pScreen) { diff --git a/miext/damage/damage.h b/miext/damage/damage.h index e5d6913d4..525b2db5d 100644 --- a/miext/damage/damage.h +++ b/miext/damage/damage.h @@ -41,12 +41,6 @@ typedef void (*DamageReportFunc) (DamagePtr pDamage, RegionPtr pRegion, void *closure); typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure); -/* It's the responsibility of the driver to duplicate both regions. */ -/* At some point DamageRegionRendered() must be called. */ -typedef void (*DamageMarkerFunc) (DrawablePtr pDrawable, DamagePtr pDamage, - RegionPtr pOldDamage, RegionPtr pRegion, - void *closure); - typedef void (*DamageScreenCreateFunc) (DamagePtr); typedef void (*DamageScreenRegisterFunc) (DrawablePtr, DamagePtr); typedef void (*DamageScreenUnregisterFunc) (DrawablePtr, DamagePtr); @@ -105,12 +99,6 @@ extern _X_EXPORT void extern _X_EXPORT void DamageRegionProcessPending(DrawablePtr pDrawable); -/* Call this some time after rendering is done, only relevant when a damageMarker is provided. */ -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); @@ -122,12 +110,6 @@ extern _X_EXPORT void extern _X_EXPORT void DamageSetReportAfterOp(DamagePtr pDamage, Bool reportAfter); -extern _X_EXPORT void - -DamageSetPostRenderingFunctions(DamagePtr pDamage, - DamageReportFunc damageReportPostRendering, - DamageMarkerFunc damageMarker); - extern _X_EXPORT DamageScreenFuncsPtr DamageGetScreenFuncs(ScreenPtr); #endif /* _DAMAGE_H_ */ diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h index 89189905e..36753ee20 100644 --- a/miext/damage/damagestr.h +++ b/miext/damage/damagestr.h @@ -44,13 +44,10 @@ typedef struct _damage { DrawablePtr pDrawable; DamageReportFunc damageReport; - DamageReportFunc damageReportPostRendering; DamageDestroyFunc damageDestroy; - DamageMarkerFunc damageMarker; Bool reportAfter; RegionRec pendingDamage; /* will be flushed post submission at the latest */ - RegionRec backupDamage; /* for use with damageMarker */ ScreenPtr pScreen; PrivateRec *devPrivates; } DamageRec; |