[PATCH damageproto 2/2] Add XDamageSubtractAndTrigger operation

James Jones jajones at nvidia.com
Thu Aug 12 16:43:51 PDT 2010


XDamageSubtractAndTrigger behaves exactly like
XDamageSubtract except it receives an optional
fence sync object.  If the value of this object
is not None, it is triggered by X once all the
rendering associated with the damage regions
being subtracted has completed.

Signed-off-by: James Jones <jajones at nvidia.com>
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
---
 damageproto.h |   13 +++++++++++++
 damagewire.h  |    5 +++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/damageproto.h b/damageproto.h
index 107e192..ab0110c 100644
--- a/damageproto.h
+++ b/damageproto.h
@@ -25,6 +25,7 @@
 #define _DAMAGEPROTO_H_
 
 #include <X11/Xmd.h>
+#include <X11/extensions/syncproto.h>
 #include <X11/extensions/xfixesproto.h>
 #include <X11/extensions/damagewire.h>
 
@@ -124,6 +125,18 @@ typedef struct {
 
 #define sz_xDamageAddReq		12
 
+typedef struct {
+    CARD8	reqType;
+    CARD8	damageReqType;
+    CARD16	length B16;
+    Damage	damage B32;
+    Region	repair B32;
+    Region	parts B32;
+    XSyncFence	finishedFence B32;
+} xDamageSubtractAndTriggerReq;
+
+#define sz_xDamageSubtractAndTriggerReq	20
+
 /* Events */
 
 #define DamageNotifyMore    0x80
diff --git a/damagewire.h b/damagewire.h
index d90a0dd..590a7bb 100644
--- a/damagewire.h
+++ b/damagewire.h
@@ -25,7 +25,7 @@
 
 #define	DAMAGE_NAME	"DAMAGE"
 #define DAMAGE_MAJOR	1
-#define DAMAGE_MINOR	1
+#define DAMAGE_MINOR	2
 
 /************* Version 1 ****************/
 
@@ -41,8 +41,9 @@
 #define X_DamageDestroy			2
 #define X_DamageSubtract		3
 #define X_DamageAdd			4
+#define X_DamageSubtractAndTrigger	5
 
-#define XDamageNumberRequests		(X_DamageAdd + 1)
+#define XDamageNumberRequests		(X_DamageSubtractAndTrigger + 1)
 
 /* Events */
 #define XDamageNotify			0
-- 
1.7.1



More information about the xorg-devel mailing list