[PATCH] protocol: add set_scaling_filter request to wl_surface interface

Sameer Lattannavar sameer.lattannavar at intel.com
Fri Dec 20 07:04:42 UTC 2019


This is an extension for wl_surface interface to support
setting scaling filter. Client can request set_scaling_filter.

Protocol implementation posted at:
https://lists.freedesktop.org/archives/wayland-devel/2019-December/041098.html

Signed-off-by: Sameer Lattannavar <sameer.lattannavar at intel.com>
---
 protocol/wayland.xml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index f1a13b7..3bb4df6 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -1715,6 +1715,33 @@
       <arg name="width" type="int" summary="width of damage rectangle"/>
       <arg name="height" type="int" summary="height of damage rectangle"/>
     </request>
+
+    <request name="set_scaling_filter" since="3">
+      <description summary="sets the filter to be used for scaling on a output">
+	Blurry outputs during upscaling the video buffer, is a generic
+	issue of graphics industry. One of the major reason behind this
+	blurriness is the interpolation of pixel values used by most of the
+	upscaling hardwares.
+
+	Nearest-neighbor is a scaling_filter type, which works by filling in the
+	missing color values in the upscaled image with that of the
+	coordinate-mapped nearest source pixel value.
+
+	Nearest-neighbor can produce (almost) non-blurry scaling outputs when
+	the scaling ratio is complete integer. For example:
+	- input buffer resolution: 1280x720(HD)
+	- output buffer resolution: 3840x2160(UHD/4K)
+	- scaling ratio (h) = 3840/1280 = 3
+	- scaling ratio (v) = 2160/720 = 3
+
+	In such scenarios, we should try to pick Nearest-neighbor as scaling
+	method when possible.
+      </description>
+      <arg name="scaling_filter" type="int"
+                summary="Positive scaling filter for interpretting type
+                        of filter to be used for integer scaling"/>
+    </request>
+
    </interface>
 
   <interface name="wl_seat" version="7">
-- 
2.17.1



More information about the wayland-devel mailing list