diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2008-08-30 00:37:11 +0200 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2008-08-30 00:37:11 +0200 |
commit | 974db58f5b730c3770ee461665a02dd4334d1dea (patch) | |
tree | e4a6598a25e173474745dce4bccc73b7cd4822ef /miext/damage/damage.h | |
parent | 454cb0802eec3c2c2cdbcc17971bced868462b83 (diff) |
damage: initial attempt at a damage marker mechanism
- This should allow drivers to recieve post submission events for X<->opengl synchronisation.
- Lacking a testcase, i'm open to suggestion how to do it better.
- The idea is:
- driver recieves event
- driver creates personal identification and inserts marker into X fifo.
- when something wants to use an X pixmap, it checks if something is pending.
- If so, it synchronizes the 2nd fifo using the initial identification.
- Driver is not required to use interrupt based systems (price too high).
- Lower latency is ofcource better.
- If this is somehow unusable for you, then come up with improvements.
- For that reason i wouldn't consider the api fixed for the moment.
Diffstat (limited to 'miext/damage/damage.h')
-rwxr-xr-x | miext/damage/damage.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/miext/damage/damage.h b/miext/damage/damage.h index ad9ab4c0d..c20a250b3 100755 --- a/miext/damage/damage.h +++ b/miext/damage/damage.h @@ -39,6 +39,9 @@ typedef enum _damageReportLevel { 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); Bool DamageSetup (ScreenPtr pScreen); @@ -86,6 +89,10 @@ DamageRegionPending (DrawablePtr pDrawable, RegionPtr pRegion); void DamageRegionSubmitted (DrawablePtr pDrawable); +/* Call this some time after rendering is done, only relevant when a damageMarker is provided. */ +void +DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion); + /* Avoid using this call, it only exists for API compatibility. */ void DamageDamageRegion (DrawablePtr pDrawable, @@ -94,4 +101,8 @@ DamageDamageRegion (DrawablePtr pDrawable, void DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter); +void +DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering, + DamageMarkerFunc damageMarker); + #endif /* _DAMAGE_H_ */ |