diff options
author | Dudemanguy <random342@airmail.cc> | 2023-01-22 17:06:15 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-01-24 00:04:39 +0000 |
commit | 006ec9ce4357cd198955bc2e56caec34943db52d (patch) | |
tree | 427e571e77d9305b5afa12d2e4e0018d5b2b8433 /video/out/opengl | |
parent | 9b59d39a3ab64da0e9489ee4ce2062d4503e7cc5 (diff) | |
download | mpv-006ec9ce4357cd198955bc2e56caec34943db52d.tar.bz2 mpv-006ec9ce4357cd198955bc2e56caec34943db52d.tar.xz |
wayland: rewrite geometry and scaling handling
This is in preparation for fractional scaling support. Basically, redo
all the coordinates in wayland so that wl->geometry is equal exactly to
what is being put out to the screen (no extra wl->scaling multiplication
required). The wl->vdparams variable is also eliminated for simplicity.
This changes mpv's behavior on wayland with hidpi scaling but that will
be addressed in more detail with the next commit.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context_wayland.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c index 400da0047d..a932ca48fc 100644 --- a/video/out/opengl/context_wayland.c +++ b/video/out/opengl/context_wayland.c @@ -43,8 +43,8 @@ static void egl_create_window(struct ra_ctx *ctx) struct vo_wayland_state *wl = ctx->vo->wl; p->egl_window = wl_egl_window_create(wl->surface, - mp_rect_w(wl->geometry) * wl->scaling, - mp_rect_h(wl->geometry) * wl->scaling); + mp_rect_w(wl->geometry), + mp_rect_h(wl->geometry)); p->egl_surface = mpegl_create_window_surface( p->egl_display, p->egl_config, p->egl_window); @@ -75,8 +75,8 @@ static void resize(struct ra_ctx *ctx) if (!p->egl_window) egl_create_window(ctx); - const int32_t width = wl->scaling * mp_rect_w(wl->geometry); - const int32_t height = wl->scaling * mp_rect_h(wl->geometry); + const int32_t width = mp_rect_w(wl->geometry); + const int32_t height = mp_rect_h(wl->geometry); vo_wayland_set_opaque_region(wl, ctx->opts.want_alpha); if (p->egl_window) |