[vlc-devel] [PATCH 14/17] vulkan: move platform header to instance.h
Alexandre Janniaux
ajanni at videolabs.io
Mon Apr 12 13:32:30 UTC 2021
The header is mostly unused now.
---
modules/video_output/vulkan/display.c | 1 -
modules/video_output/vulkan/instance.h | 6 +++
modules/video_output/vulkan/platform.h | 42 -------------------
.../video_output/vulkan/platform_android.c | 2 +-
modules/video_output/vulkan/platform_win32.c | 2 +-
modules/video_output/vulkan/platform_xcb.c | 2 +-
6 files changed, 9 insertions(+), 46 deletions(-)
delete mode 100644 modules/video_output/vulkan/platform.h
diff --git a/modules/video_output/vulkan/display.c b/modules/video_output/vulkan/display.c
index 81f562e0fb..eb9de4bb65 100644
--- a/modules/video_output/vulkan/display.c
+++ b/modules/video_output/vulkan/display.c
@@ -33,7 +33,6 @@
#include "../placebo_utils.h"
#include "instance.h"
-#include "platform.h"
#include <libplacebo/renderer.h>
#include <libplacebo/utils/upload.h>
diff --git a/modules/video_output/vulkan/instance.h b/modules/video_output/vulkan/instance.h
index 29650398c7..22f834bfde 100644
--- a/modules/video_output/vulkan/instance.h
+++ b/modules/video_output/vulkan/instance.h
@@ -58,4 +58,10 @@ vlc_vk_t *vlc_vk_Create(struct vout_window_t *, const char *) VLC_USED;
void vlc_vk_Release(vlc_vk_t *);
void vlc_vk_Hold(vlc_vk_t *);
+//// Create a vulkan surface to vk->surface
+inline int vlc_vk_CreateSurface(vlc_vk_t * vk, VkInstance instance, VkSurfaceKHR *surface_out)
+{
+ return vk->ops->create_surface(vk, instance, surface_out);
+}
+
#endif // VLC_VULKAN_INSTANCE_H
diff --git a/modules/video_output/vulkan/platform.h b/modules/video_output/vulkan/platform.h
deleted file mode 100644
index 8c0045959f..0000000000
--- a/modules/video_output/vulkan/platform.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * platform.h: Vulkan platform-specific functions
- *****************************************************************************
- * Copyright (C) 2018 Niklas Haas
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef VLC_VULKAN_PLATFORM_H
-#define VLC_VULKAN_PLATFORM_H
-
-#include "instance.h"
-
-// Initializes a platform-specific context to vk->platform_sys
-int vlc_vk_InitPlatform(vlc_vk_t *);
-void vlc_vk_ClosePlatform(vlc_vk_t *);
-
-// Contains the required platform-specific instance extension
-extern const char * const vlc_vk_PlatformExt;
-
-// Create a vulkan surface to vk->surface
-void vlc_vk_ClosePlatform(vlc_vk_t *vk);
-
-// Create a vulkan surface to vk->surface
-inline int vlc_vk_CreateSurface(vlc_vk_t * vk, VkInstance instance, VkSurfaceKHR *surface_out)
-{
- return vk->ops->create_surface(vk, instance, surface_out);
-}
-
-#endif // VLC_VULKAN_PLATFORM_H
diff --git a/modules/video_output/vulkan/platform_android.c b/modules/video_output/vulkan/platform_android.c
index 6c87a9b644..6929de47e4 100644
--- a/modules/video_output/vulkan/platform_android.c
+++ b/modules/video_output/vulkan/platform_android.c
@@ -27,7 +27,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include "platform.h"
+#include "instance.h"
#include "../android/utils.h"
static int InitPlatform(vlc_vk_t *vk)
diff --git a/modules/video_output/vulkan/platform_win32.c b/modules/video_output/vulkan/platform_win32.c
index c905feb345..297d146a9c 100644
--- a/modules/video_output/vulkan/platform_win32.c
+++ b/modules/video_output/vulkan/platform_win32.c
@@ -26,7 +26,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include "platform.h"
+#include "instance.h"
static void ClosePlatform(vlc_vk_t *vk);
static int CreateSurface(vlc_vk_t *vk);
diff --git a/modules/video_output/vulkan/platform_xcb.c b/modules/video_output/vulkan/platform_xcb.c
index 003267bf7e..be7185878c 100644
--- a/modules/video_output/vulkan/platform_xcb.c
+++ b/modules/video_output/vulkan/platform_xcb.c
@@ -27,7 +27,7 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include "platform.h"
+#include "instance.h"
static void ClosePlatform(vlc_vk_t *vk);
static int CreateSurface(vlc_vk_t *vk, VkInstance instance, VkSurfaceKHR *surface_out);
--
2.31.1
More information about the vlc-devel
mailing list