[PATCH] compositor: allow query of surface formats.

Gwenole Beauchesne gb.devel at gmail.com
Fri Apr 27 08:52:11 PDT 2012


Hi,

Add new query to collect surface formats supported for rendering through
surface_format events. This allows for checking whether the compositor
supports rendering YUV buffers for example.

Note: this depends on the generic wl_buffer formats patch series. Is there
a way to let the server fill in a wl_array instead? I am not sure this model
that implies querying the server, iterate, and listen back for events is
viable.

Thanks,
Gwenole.
---
 protocol/wayland.xml |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 15260f5..a09cb30 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -133,6 +133,23 @@
       </description>
       <arg name="id" type="new_id" interface="wl_region"/>
     </request>
+
+    <request name="query_surface_formats">
+      <description summary="query surface formats">
+        Ask the compositor to return the list of surface formats
+        supported for rendering as several surface_format events.
+      </description>
+    </request>
+
+    <event name="surface_format">
+      <description summary="surface format">
+        Sent as a result of the query_surface_formats() request.
+        This corresponds to a supported wl_buffer format for
+        rendering.
+      </description>
+      <arg name="format" type="uint"
+           summary="a wl_buffer_format"/>
+    </event>
   </interface>
 
   <interface name="wl_shm_pool" version="1">
-- 
1.7.5.4



More information about the wayland-devel mailing list