summaryrefslogtreecommitdiff
path: root/randrproto.txt
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-11-24 16:22:11 -0800
committerKeith Packard <keithp@keithp.com>2008-11-24 16:22:11 -0800
commit6c17940a7960885695aa6033de58c3cd2bb6fb79 (patch)
treef2a57e43d79606e67b90d2aa7744c1352ada95c2 /randrproto.txt
parentc998b4658d735e5b2d7aa6983d732d40cc802823 (diff)
parent8793429f3d9d7cdf16be118ce05a68af6531568e (diff)
downloadxorg-proto-randrproto-6c17940a7960885695aa6033de58c3cd2bb6fb79.tar.gz
Merge branch 'transform-proposal'
Conflicts: randr.h randrproto.h randrproto.txt
Diffstat (limited to 'randrproto.txt')
-rw-r--r--randrproto.txt143
1 files changed, 124 insertions, 19 deletions
diff --git a/randrproto.txt b/randrproto.txt
index b3bd8b2..58c9e40 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1,6 +1,6 @@
The X Resize, Rotate and Reflect Extension
- Version 1.2
- 2006-4-13
+ Version 1.3
+ 2006-20-7
Jim Gettys
Jim.Gettys@hp.com
@@ -110,6 +110,17 @@ bandwidth for large resolution screens. This is exposed in RandR by
requiring that nothing be connected to the second CRTC when driving a high
resolution screen on the first.
+1.3 Introduction to version 1.3 of the extension
+
+Version 1.3 builds on the changes made with version 1.2 and adds some new
+capabilities without fundmentally changing the extension again. The
+following features are added in this version:
+
+ • Projective Transforms. The implementation work for general rotation
+ support made it trivial to add full projective transformations. These
+ can be used to scale the screen up/down as well as perform projector
+ keystone correct or other effects.
+
1.1 Acknowledgements
Our thanks to the contributors to the design found on the xpert mailing
@@ -846,8 +857,10 @@ dynamic changes in the display environment.
'x' and 'y' indicate the position of this CRTC within the screen
region. They will be set to 0 when the CRTC is disabled.
- 'width' and 'height' indicate the size of the area presented by this
- CRTC.
+ 'width' and 'height' indicate the size of the area within the screen
+ presented by this CRTC. This may be different than the size of the
+ mode due to rotation. They will be set to 0 when the CRTC is
+ disabled.
'mode' indicates which mode is active, or None indicating that the
CRTC has been disabled and is not displaying the screen contents.
@@ -1002,6 +1015,50 @@ dynamic changes in the display environment.
Unlike RRGetScreenResources, this merely returns the current
configuration, and does not poll for hardware changes.
+┌───
+ RRSetCrtcTransform
+ crtc: CRTC
+ transform: TRANSFORM
+ filter: STRING8
+ values: LISTofFIXED
+└───
+ Errors: Crtc, Match
+
+This request provides a mechanism that is more general than the existing
+rotation and reflection values for describing the transformation from frame
+buffer image to crtc presentation. 'transform' is a full 2D projective
+transformations from screen coordinate space to crtc coordinate space. This
+transformation is applied before the rotation and reflection values to
+compute the complete transform.
+
+'filter' and 'values' specify a Render filter that may be used by the server
+when transforming data from frame buffer to crtc.
+
+This request sets the transform to be used at the next RRSetCrtcConfig
+request execution; it does not cause any change to occur in the current
+configuration.
+
+When a non-identity transformation is in use, the rectangle returned by
+RRGetCrtcInfo defines the bounding rectangle of the screen that is projected
+to the crtc. It is this projected rectangle which must be within the area of
+the screen when the mode is set.
+
+┌───
+ RRGetCrtcTransform
+ crtc: CRTC
+ ▶
+ pending-transform: TRANSFORM
+ pending-filter: STRING8
+ pending-values: LISTofFIXED
+ current-transform: TRANSFORM
+ current-filter: STRING8
+ current-values: LISTofFIXED
+└───
+
+This request returns the pending and current transforms for the specified
+CRTC. The pending transform will be the same as the current transform if no
+new pending transform has been set since the last call to RRSetCrtcConfig.
+
❧❧❧❧❧❧❧❧❧❧❧
8. Extension Events
@@ -1024,12 +1081,12 @@ factors, such as re-cabling a monitor, etc.
configTimestamp: TIMESTAMP time config data was changed
root: WINDOW root window of screen
window: WINDOW window requesting notification
- size-id: SIZEID index of new size
+ size-id: SIZEID index of new SCREENSIZE
subpixelOrder: SUBPIXELORDER order of subpixels
- widthInPixels: CARD16
- heightInPixels: CARD16
- widthInMillimeters: CARD16
- heightInMillimeters: CARD16
+ widthInPixels: CARD16 width in pixels of the new SCREENSIZE
+ heightInPixels: CARD16 height in pixels of the new SCREENSIZE
+ widthInMillimeters: CARD16 width in mm of the new SCREENSIZE
+ heightInMillimeters: CARD16 height in mm of the new SCREENSIZE
└───
This event is generated whenever the screen configuration is changed
and sent to requesting clients. 'timestamp' indicates when the
@@ -1055,6 +1112,13 @@ factors, such as re-cabling a monitor, etc.
just at the time when a display manager or log in script might
be changing the screen size or configuration.
+ Note that the sizes in this event reflect the new SCREENSIZE and
+ thus will appear rotated by the 'rotation' parameter from the sizes
+ of the screen itself. In other words, when rotation is 90 or 270,
+ widthInPixels in this event will be the same as the height value
+ from a ConfigureNotify that reflects the same size change. This
+ will probably confuse developers.
+
8.1 Events added in version 1.2 of the RandR extension
┌───
@@ -1099,27 +1163,26 @@ factors, such as re-cabling a monitor, etc.
┌───
RRCrtcChangeNotify
timestamp: TIMESTAMP time monitor was changed
- config-timestamp: TIMESTAMP time config data was changed
- root: WINDOW root window of screen
window: WINDOW window requesting notification
crtc: CRTC CRTC which changed
mode: MODE new mode
rotation: ROTATION; new rotation
x: INT16 x position of CRTC within screen
y: INT16 y position of CRTC within screen
+ width: CARD16 width of new mode
+ height: CARD16 height of new mode
└───
This event is generated whenever the CRTC configuration is changed
and sent to requesting clients. 'timestamp' indicates when the
- CRTC configuration was changed. 'config-timestamp' says when the
- last time the configuration was changed. 'root' is the root of the
- screen the change occurred on, 'window' is window selecting for this
- event.
+ CRTC configuration was changed. 'window' is window selecting for this
+ event. 'mode' is the new mode, or None if the crtc is disabled.
+ 'x' and 'y' mark the location in the screen where this CRTC
+ is reading data. 'width' and 'height' indicate the size of the
+ mode. 'x', 'y, 'width' and 'height' are all zero when 'mode' is None.
This event is sent whenever the monitor's configuration changes
or if a new monitor configuration becomes available that was
- not available in the past. In this case (config-timestamp in
- the event not being equal to the config-timestamp returned in
- the last call to RRGetCrtcModes), the client MUST call
+ not available in the past. In this case, the client MUST call
RRGetCrtcModes to update its view of possible monitor
configurations to have a correct view of possible monitor
organizations.
@@ -1723,7 +1786,7 @@ A.2.2 Protocol Requests added with version 1.3
┌───
RRGetScreenResourcesCurrent
1 CARD8 major opcode
- 1 8 RandR opcode
+ 1 25 RandR opcode
2 2 length
4 WINDOW window
@@ -1745,6 +1808,48 @@ A.2.2 Protocol Requests added with version 1.3
p unused, p=pad(b)
└───
+┌───
+ RRSetCrtcTransform
+ 1 CARD8 major opcode
+ 1 26 RandR opcode
+ 2 12+(n+p)/4+v length
+ 4 CRTC crtc
+ 36 TRANSFORM transform
+ 2 CARD16 filter length
+ 2 unused
+ n STRING8 filter name
+ p unused, p=pad(n)
+ 4v FIXED filter params
+└───
+
+┌───
+ RRGetCrtcTransform
+ 1 CARD8 major opcode
+ 1 27 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 16+(pn+pnp)/4+(cn+cnp)/4+pf+cf reply length
+ 36 TRANSFORM pending transform
+ 1 BOOL has transforms
+ 3 unused
+ 36 TRANSFORM current transform
+ 4 unused
+ 2 pn pending filter name length
+ 2 pf pending filter num params
+ 2 cn current filter name length
+ 2 cf current filter num params
+ pn STRING8 pending filter name
+ pnp unused, pnp=pad(pn)
+ 4*pf FIXED pending filter params
+ cn STRING8 current filter name
+ cnp unused, cnp=pad(cn)
+ 4*cf FIXED current filter params
+└───
+
A.3 Protocol Events
┌───