[PATCH wayland 2/2] protocol: Add a wl_surface request for setting buffer transformation

Ander Conselvan de Oliveira ander.conselvan.de.oliveira at intel.com
Tue Nov 27 07:03:41 PST 2012


This request allows a client to render its contents according to the
output transform, enabling the compositor to use optimizations such as
overlays, hardware cursors, scan out of a client buffer for
fullscreen surface, etc, even if the output is rotated.
---
 protocol/wayland.xml |   34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index cc8fb06..0ce68ef 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -153,7 +153,7 @@
     </event>
   </interface>
 
-  <interface name="wl_compositor" version="1">
+  <interface name="wl_compositor" version="2">
     <description summary="the compositor singleton">
       A compositor.  This object is a singleton global.  The
       compositor is in charge of combining the contents of multiple
@@ -731,7 +731,7 @@
     </event>
   </interface>
 
-  <interface name="wl_surface" version="1">
+  <interface name="wl_surface" version="2">
     <description summary="an onscreen surface">
       A surface.  This is an image that is displayed on the screen.
       It has a location, size and pixel contents.
@@ -921,7 +921,35 @@
       </description>
       <arg name="output" type="object" interface="wl_output"/>
     </event>
-  </interface>
+
+    <!-- Version 2 additions -->
+
+    <request name="set_buffer_transform" since="2">
+      <description summary="sets the buffer transformation">
+	This request sets an optional transformation on how the compositor
+	interprets the contents of the buffer attached to the surface. The
+	accepted values for the transform parameter are the values for
+	wl_output.transform.
+
+	Buffer transform is double-buffered state, see wl_surface.commit.
+
+	A newly created surface has its buffer transformation set to normal.
+
+	The purpose of this request is to allow clients to render content
+	according to the output transform, thus permiting the compositor to
+	use certain optimizations even if the display is rotated. Using
+	hardware overlays and scanning out a client buffer for fullscreen
+	surfaces are examples of such optmizations. Those optimizations are
+	highly dependent on the compositor implementation, so the use of this
+	request should be considered on a case-by-case basis.
+
+	Note that if the transform value includes 90 or 270 degree rotation,
+	the width of the buffer will become the surface height and the height
+	of the buffer will become the surface width.
+      </description>
+      <arg name="transform" type="int"/>
+    </request>
+   </interface>
 
   <interface name="wl_seat" version="1">
     <description summary="seat">
-- 
1.7.10.4



More information about the wayland-devel mailing list