From 616b7f6ae0329ba47f460b04601a5da6c40ab529 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 17 Feb 2021 16:40:33 +0000 Subject: [PATCH] c/main: Tidy comp_target_swapchain --- src/xrt/compositor/main/comp_target_swapchain.c | 15 +++++++++++---- src/xrt/compositor/main/comp_target_swapchain.h | 13 ------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/xrt/compositor/main/comp_target_swapchain.c b/src/xrt/compositor/main/comp_target_swapchain.c index cd016fd4b..cbf6d68e5 100644 --- a/src/xrt/compositor/main/comp_target_swapchain.c +++ b/src/xrt/compositor/main/comp_target_swapchain.c @@ -68,7 +68,7 @@ _check_surface_present_mode(struct comp_target_swapchain *cts, VkSurfaceKHR surf /* * - * Functions! + * Vulkan functions. * */ @@ -78,7 +78,7 @@ get_vk(struct comp_target_swapchain *cts) return &cts->base.c->vk; } -void +static void comp_target_swapchain_create_images(struct comp_target *ct, uint32_t width, uint32_t height, @@ -233,7 +233,7 @@ comp_target_swapchain_destroy_old(struct comp_target_swapchain *cts, VkSwapchain } } -VkResult +static VkResult comp_target_swapchain_acquire_next_image(struct comp_target *ct, VkSemaphore semaphore, uint32_t *out_index) { struct comp_target_swapchain *cts = (struct comp_target_swapchain *)ct; @@ -249,7 +249,7 @@ comp_target_swapchain_acquire_next_image(struct comp_target *ct, VkSemaphore sem out_index); // pImageIndex } -VkResult +static VkResult comp_target_swapchain_present(struct comp_target *ct, VkQueue queue, uint32_t index, VkSemaphore semaphore) { struct comp_target_swapchain *cts = (struct comp_target_swapchain *)ct; @@ -466,6 +466,13 @@ comp_target_swapchain_create_image_views(struct comp_target_swapchain *cts) free(images); } + +/* + * + * 'Exported' functions. + * + */ + void comp_target_swapchain_cleanup(struct comp_target_swapchain *cts) { diff --git a/src/xrt/compositor/main/comp_target_swapchain.h b/src/xrt/compositor/main/comp_target_swapchain.h index 6624e6677..671588825 100644 --- a/src/xrt/compositor/main/comp_target_swapchain.h +++ b/src/xrt/compositor/main/comp_target_swapchain.h @@ -72,19 +72,6 @@ struct comp_target_swapchain void comp_target_swapchain_init_set_fnptrs(struct comp_target_swapchain *cts); -/*! - * See comp_target::create_images. - * - * @ingroup comp_main - */ -void -comp_target_swapchain_create_images(struct comp_target *ct, - uint32_t width, - uint32_t height, - VkFormat color_format, - VkColorSpaceKHR color_space, - VkPresentModeKHR present_mode); - /*! * Free all managed resources on the given @ref comp_target_swapchain, * does not free the struct itself.