protocol: Add a wl_surface request for setting buffer transformation

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.
This commit is contained in:
Ander Conselvan de Oliveira 2012-11-27 17:03:41 +02:00 committed by Kristian Høgsberg
parent 00639de120
commit e8fbce73c7

View file

@ -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">