[PATCH] protocol: add support for getting aspect ratio info from modes

Nautiyal Ankit ankit.k.nautiyal at intel.com
Wed Sep 6 12:20:01 UTC 2017

From: Ankit Nautiyal <ankit.k.nautiyal at intel.com>

The Structure wl_output_mode has flags that describe properties for
output mode. This patch adds the support for aspect ratio property.
These flags if set, will give information about the aspect ratio
supported by an output mode. The wayland based compositors can use this
info to select the appropriate mode with required aspect ratio.

The bits 2-5 of the 32 bit flag can be used for identifying different
aspect ratio: 4:3,16:9,64:27,256:135.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
 protocol/wayland.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 29b63be..6845f13 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -2418,6 +2418,18 @@
 	     summary="indicates this is the current mode"/>
       <entry name="preferred" value="0x2"
 	     summary="indicates this is the preferred mode"/>
+      <entry name="aspect_ratio_mask" value="0x3C"
+	     summary="aspect ratio mask for different aspect ratios. Bits 2 to 5"/>
+      <entry name="picture_aspect_none" value="0x0"
+	     summary="indicates no aspect ratio"/>
+      <entry name="picture_aspect_4_3" value="0x1"
+	     summary="indicates aspect ratio 4:3"/>
+      <entry name="picture_aspect_16_9" value="0x2"
+	     summary="indicates aspect ratio 16:9"/>
+      <entry name="picture_aspect_64_27" value="0x3"
+	     summary="indicates aspect ratio 64:27"/>
+      <entry name="picture_aspect_256_135" value="0x4"
+	     summary="indicates aspect ratio 256:135"/>
     <event name="mode">

More information about the wayland-devel mailing list