summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan/context.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-11-04 09:42:54 -0500
committerDudemanguy <random342@airmail.cc>2021-11-04 15:59:56 +0000
commitacde63f05ade3f4da8424bb3b764966e9f7a3fc3 (patch)
tree3aa66218c2b690c499d214c524da26e215afe763 /video/out/vulkan/context.h
parenta73e5cdbed417c554244dda403412d57cba12e8d (diff)
downloadmpv-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.h')
-rw-r--r--video/out/vulkan/context.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/vulkan/context.h b/video/out/vulkan/context.h
index d85b3fe193..c846942b0e 100644
--- a/video/out/vulkan/context.h
+++ b/video/out/vulkan/context.h
@@ -7,8 +7,9 @@ struct ra_vk_ctx_params {
// See ra_swapchain_fns.get_vsync.
void (*get_vsync)(struct ra_ctx *ctx, struct vo_vsync_info *info);
- // In case something special needs to be done when starting a frame.
- bool (*start_frame)(struct ra_ctx *ctx);
+ // For special contexts (i.e. wayland) that want to check visibility
+ // before drawing a frame.
+ bool (*check_visible)(struct ra_ctx *ctx);
// In case something special needs to be done on the buffer swap.
void (*swap_buffers)(struct ra_ctx *ctx);
@@ -27,4 +28,4 @@ bool ra_vk_ctx_resize(struct ra_ctx *ctx, int width, int height);
struct mpvk_ctx *ra_vk_ctx_get(struct ra_ctx *ctx);
// Get the user requested Vulkan device name.
-char *ra_vk_ctx_get_device_name(struct ra_ctx *ctx); \ No newline at end of file
+char *ra_vk_ctx_get_device_name(struct ra_ctx *ctx);