summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-01-20 12:41:11 -0600
committerDudemanguy <random342@airmail.cc>2024-01-27 05:12:12 +0000
commite32554cd570d984efb712a7214a40237233a3cea (patch)
treef392ed4372179f0053df75d90b4ea6aa10dc6621 /video/out/vulkan
parent99d387bbc81e36f60da26d63b96736e2461bcd2e (diff)
downloadmpv-e32554cd570d984efb712a7214a40237233a3cea.tar.bz2
mpv-e32554cd570d984efb712a7214a40237233a3cea.tar.xz
wayland: drop buffer_scale use for viewporter
The core wayland protocol way of handling scaling is to use the buffer_scale mechanism. But this sucks in several ways for reasons I won't list here and fractional scaling rightly avoids this altogether and uses a buffer_scale of 1 (i.e. not setting it) along with viewporter. When originally implemented, this was only specifically used when the fractional scale protocol was available, but we actually can use it as a full replacement instead. This means that mpv now hard requires viewporter, but this protocol is supported by everyone and is one of the few that is actually stable. How it works is the same regardless of fractional scaling or not. When the compositor has a scale value not equal to 1, it will always scale the client by that factor (unless you set buffer_scale). What we do here is pass a viewporter size that exactly undos the compositor-side scale (sans a possible rounding error). So what we are left with is just the exactly physical pixels we want to display. Fixes #13316.
Diffstat (limited to 'video/out/vulkan')
-rw-r--r--video/out/vulkan/context_wayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c
index 761ff5b12c..cdf1ba60b8 100644
--- a/video/out/vulkan/context_wayland.c
+++ b/video/out/vulkan/context_wayland.c
@@ -118,7 +118,7 @@ static bool resize(struct ra_ctx *ctx)
const int32_t height = mp_rect_h(wl->geometry);
vo_wayland_set_opaque_region(wl, ctx->opts.want_alpha);
- vo_wayland_handle_fractional_scale(wl);
+ vo_wayland_handle_scale(wl);
return ra_vk_ctx_resize(ctx, width, height);
}