summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--presentproto.h9
-rw-r--r--presentproto.txt55
-rw-r--r--presenttokens.h15
3 files changed, 40 insertions, 39 deletions
diff --git a/presentproto.h b/presentproto.h
index 44dc96c..3e2c0bb 100644
--- a/presentproto.h
+++ b/presentproto.h
@@ -132,16 +132,15 @@ typedef struct {
CARD16 sequenceNumber B16;
CARD32 length;
CARD16 evtype B16;
- CARD16 pad2 B16;
+ CARD16 kind B16;
CARD32 eid B32;
Window window B32;
CARD32 serial B32;
CARD64 ust;
+
CARD64 msc;
- CARD64 sbc;
-} xPresentCompleteNotify, xPresentMSCNotify;
-#define sz_xPresentCompleteNotify 48
-#define sz_xPresentMSCNotify 48
+} xPresentCompleteNotify;
+#define sz_xPresentCompleteNotify 40
typedef struct {
CARD8 type;
diff --git a/presentproto.txt b/presentproto.txt
index 8f64779..6b226ab 100644
--- a/presentproto.txt
+++ b/presentproto.txt
@@ -29,10 +29,17 @@ PRESENTEVENTID { XID }
events. Multiple event IDs can be allocated to provide
multiple distinct event delivery contexts.
+PRESENTEVENTTYPE { PresentConfigureNotify,
+ PresentCompleteNotify,
+ PresentRedirectNotify }
+
PRESENTEVENTMASK { PresentConfigureNotifyMask,
PresentCompleteNotifyMask,
PresentSubredirectNotifyMask }
+PRESENTCOMPLETEKIND { PresentCompleteKindRegion,
+ PresentCompleteKindMSCNotify }
+
The Present extension also uses the Sync extension Fence data type to
provide synchronization for pixmaps.
@@ -140,6 +147,9 @@ The name of this extension is "Present"
field. Otherwise, the presentation will occur after the next
field where msc % 'divisor' == 'remainder'.
+ After the presentation occurs, a PresentCompleteNotify event
+ with kind PresentCompleteKindRegion will be generated.
+
If 'window' is destroyed before the presentation occurs, then
the presentation action will not be completed.
@@ -162,7 +172,8 @@ The name of this extension is "Present"
└───
Errors: Window
- Delivers a PresentMSCNotifyEvent after time specified by
+ Delivers a PresentCompleteNotifyEvent with kind
+ PresentCompleteKindNotifyMSC after the time specified by
'target-msc', 'divisor' and 'remainder').
'serial' is an arbitrary client-specified value which will be
@@ -242,41 +253,28 @@ The name of this extension is "Present"
type: CARD8 XGE event type (35)
extension: CARD8 Present extension request number
length: CARD16 2
- evtype: CARD16 Present_CompleteNotify
+ evtype: PRESENTEVENTTYPE PresentCompleteNotify
eventID: PRESENTEVENTID
window: WINDOW
+ kind: PRESENTCOMPLETEKIND
serial: CARD32
ust: CARD64
msc: CARD64
- sbc: CARD64
└───
- CompleteNotify events are delivered when a PresentRegion
- operation has completed and the specified contents are being
- displayed. 'serial' is the value provided in the generating
- PresentRegion request. 'sbc', 'msc' and 'ust' indicate the
- swap count, frame count and system time when the presentation
- actually occurred.
+ CompleteNotify events are delivered when a PresentRegion or
+ PresentNotifyMSC operation has completed.
-┌───
- PresentMSCNotify
- type: CARD8 XGE event type (35)
- extension: CARD8 Present extension request number
- length: CARD16 2
- evtype: CARD16 Present_MSCNotify
- eventID: PRESENTEVENTID
- window: WINDOW
- serial: CARD32
- ust: CARD64
- msc: CARD64
- sbc: CARD64
-└───
+ 'kind' is PresentCompleteKindRegion when generated by a
+ PresentRegion operation completion or
+ PresentCompleteKindNotifyMsc when generated by a
+ PresentNotifyMSC operation completion.
+
+ 'serial' is the value provided in the generating PresentRegion
+ request.
- MSCNotify events are delivered when a PresentNotifyMSC
- operation has completed. 'serial' is the value provided in the
- generating PresentNotifyMSC request. 'sbc', 'msc' and 'ust'
- indicate the swap count, frame count and system time when the
- operation completed.
+ 'msc' and 'ust' indicate the frame count and system time when
+ the presentation actually occurred.
┌───
PresentRedirectNotify
@@ -410,13 +408,12 @@ A.3 Protocol Events
2 CARD16 sequence number
4 2 length
2 1 PresentCompleteNotify
- 2 unused
+ 2 CARD16 kind
4 CARD32 event id
4 Window window
4 CARD32 serial
8 CARD64 ust
8 CARD64 msc
- 8 CARD64 sbc
└───
A.4 Protocol Errors
diff --git a/presenttokens.h b/presenttokens.h
index d829f11..dbfdb36 100644
--- a/presenttokens.h
+++ b/presenttokens.h
@@ -30,6 +30,7 @@
#define PresentNumberErrors 0
#define PresentNumberEvents 0
+/* Requests */
#define X_PresentQueryVersion 0
#define X_PresentRegion 1
#define X_PresentNotifyMSC 2
@@ -37,19 +38,23 @@
#define PresentNumberRequests 4
+/* Events */
#define PresentConfigureNotify 0
#define PresentCompleteNotify 1
-#define PresentMSCNotify 2
-#define PresentRedirectNotify 3
+#define PresentRedirectNotify 2
+/* Event Masks */
#define PresentConfigureNotifyMask 1
#define PresentCompleteNotifyMask 2
-#define PresentMSCNotifyMask 4
-#define PresentRedirectNotifyMask 8
+#define PresentRedirectNotifyMask 4
#define PresentAllEvents (PresentConfigureNotifyMask | \
PresentCompleteNotifyMask | \
- PresentMSCNotifyMask | \
PresentRedirectNotifyMask)
+/* Complete Kinds */
+
+#define PresentCompleteKindRegion 0
+#define PresentCompleteKindNotifyMSC 1
+
#endif