mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 00:07:33 +00:00
vo_dmabuf_wayland: stop guarding viewport interfaces
It's entirely pointless. Not having viewport is already a fatal error for this VO as it cannot possibly work without that protocol. Just drop all these redundant if's.
This commit is contained in:
parent
dc06dec1ee
commit
a890d7be2a
@ -328,15 +328,13 @@ static void resize(struct vo *vo)
|
||||
vo->opts->pan_x = 0;
|
||||
vo->opts->pan_y = 0;
|
||||
vo_get_src_dst_rects(vo, &src, &dst, &osd);
|
||||
if (wl->viewport)
|
||||
wp_viewport_set_destination(wl->viewport, 2 * dst.x0 + mp_rect_w(dst), 2 * dst.y0 + mp_rect_h(dst));
|
||||
wp_viewport_set_destination(wl->viewport, 2 * dst.x0 + mp_rect_w(dst), 2 * dst.y0 + mp_rect_h(dst));
|
||||
|
||||
//now we restore pan for video viewport calculation
|
||||
vo->opts->pan_x = vo_opts->pan_x;
|
||||
vo->opts->pan_y = vo_opts->pan_y;
|
||||
vo_get_src_dst_rects(vo, &src, &dst, &osd);
|
||||
if (wl->video_viewport)
|
||||
wp_viewport_set_destination(wl->video_viewport, mp_rect_w(dst), mp_rect_h(dst));
|
||||
wp_viewport_set_destination(wl->video_viewport, mp_rect_w(dst), mp_rect_h(dst));
|
||||
wl_subsurface_set_position(wl->video_subsurface, dst.x0, dst.y0);
|
||||
set_viewport_source(vo, src);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user