diff options
author | Dudemanguy <random342@airmail.cc> | 2021-11-04 09:42:54 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-11-04 15:59:56 +0000 |
commit | acde63f05ade3f4da8424bb3b764966e9f7a3fc3 (patch) | |
tree | 3aa66218c2b690c499d214c524da26e215afe763 /video/out/vulkan/context.c | |
parent | a73e5cdbed417c554244dda403412d57cba12e8d (diff) | |
download | mpv-acde63f05ade3f4da8424bb3b764966e9f7a3fc3.tar.bz2 mpv-acde63f05ade3f4da8424bb3b764966e9f7a3fc3.tar.xz |
wayland_vk: rename start_frame to check_visible
This vulkan-specific parameter was poorly named and probably causes
confusion. Just rename it to check_visible instead to make clear what is
going on here. Only wayland uses it for now but in theory anyone else
can. As an aside, wayland egl accomplishes this by using an external
swapchain instead (an opengl-only concept in the mpv code). This may or
may not need to be changed in the future when gpu-next gets opengl
support.
Diffstat (limited to 'video/out/vulkan/context.c')
-rw-r--r-- | video/out/vulkan/context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/vulkan/context.c b/video/out/vulkan/context.c index 3e49435f14..bcc52f46f3 100644 --- a/video/out/vulkan/context.c +++ b/video/out/vulkan/context.c @@ -239,10 +239,10 @@ static bool start_frame(struct ra_swapchain *sw, struct ra_fbo *out_fbo) { struct priv *p = sw->priv; struct pl_swapchain_frame frame; - bool start = true; - if (p->params.start_frame) - start = p->params.start_frame(sw->ctx); - if (!start) + bool visible = true; + if (p->params.check_visible) + visible = p->params.check_visible(sw->ctx); + if (!visible) return false; if (!pl_swapchain_start_frame(p->vk->swapchain, &frame)) return false; |