summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-01-23 14:16:43 -0600
committerDudemanguy <random342@airmail.cc>2023-01-24 00:04:39 +0000
commit879824a47f50f7e93f85992c92d03f37129605f4 (patch)
tree6e69209e1fe4fa0019fe51384ab15d1335f170ec /wscript_build.py
parent006ec9ce4357cd198955bc2e56caec34943db52d (diff)
downloadmpv-879824a47f50f7e93f85992c92d03f37129605f4.tar.bz2
mpv-879824a47f50f7e93f85992c92d03f37129605f4.tar.xz
wayland: add wp-fractional-scale-v1 support
This protocol is pretty important since it finally lets us solve the longstanding issue of fractional scaling in wayland (no more mpv doing rendering over the target resolution and then being scaled down). This protocol also can completely replace the buffer_scale usage that we are currently using for integer scaling so hopefully this can be removed sometime in the future. Note that vo_dmabuf_wayland is omitted from the fractional scale handling because we want the compositor to handle all the scaling for that VO. Fixes #9443.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index b35ae069c3..4ae1ad3dee 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -154,6 +154,15 @@ def build(ctx):
protocol = "staging/single-pixel-buffer/single-pixel-buffer-v1",
target = "generated/wayland/single-pixel-buffer-v1.h")
+
+ if ctx.dependency_satisfied('wayland-protocols-1-31'):
+ ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR,
+ protocol = "staging/fractional-scale/fractional-scale-v1",
+ target = "generated/wayland/fractional-scale-v1.c")
+ ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR,
+ protocol = "staging/fractional-scale/fractional-scale-v1",
+ target = "generated/wayland/fractional-scale-v1.h")
+
ctx(features = "ebml_header", target = "generated/ebml_types.h")
ctx(features = "ebml_definitions", target = "generated/ebml_defs.inc")
@@ -557,6 +566,7 @@ def build(ctx):
( "video/out/w32_common.c", "win32-desktop" ),
( "generated/wayland/single-pixel-buffer-v1.c", "wayland-protocols-1-27" ),
( "generated/wayland/content-type-v1.c", "wayland-protocols-1-27" ),
+ ( "generated/wayland/fractional-scale-v1.c", "wayland-protocols-1-31"),
( "generated/wayland/idle-inhibit-unstable-v1.c", "wayland" ),
( "generated/wayland/presentation-time.c", "wayland" ),
( "generated/wayland/xdg-decoration-unstable-v1.c", "wayland" ),