[PATCH damageproto (rev3) 2/3] Add XDamageSubtractAndTrigger operation

James Jones jajones at nvidia.com
Thu Dec 2 09:21:20 PST 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 |   15 +++++++++++++++
 damagewire.h  |    5 +++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/damageproto.h b/damageproto.h
index 107e192..edc2e0a 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>
 
@@ -43,6 +44,7 @@
 #define Picture CARD32
 #define Region CARD32
 #define Damage CARD32
+#define XSyncFence CARD32
 
 /************** Version 0 ******************/
 
@@ -124,6 +126,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
@@ -139,6 +153,7 @@ typedef struct {
     xRectangle	geometry;
 } xDamageNotifyEvent;
 
+#undef XSyncFence
 #undef Damage
 #undef Region
 #undef Picture
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