From e8fbce73c7d2d546fcb90fe6115306f27c699fff Mon Sep 17 00:00:00 2001 From: Ander Conselvan de Oliveira Date: Tue, 27 Nov 2012 17:03:41 +0200 Subject: [PATCH] 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. --- 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 @@ - + A compositor. This object is a singleton global. The compositor is in charge of combining the contents of multiple @@ -731,7 +731,7 @@ - + A surface. This is an image that is displayed on the screen. It has a location, size and pixel contents. @@ -921,7 +921,35 @@ - + + + + + + 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. + + + + -- 2.7.4