mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Drop Host_GetRenderSurface and pass display to backend
This commit is contained in:
@ -19,15 +19,17 @@ class ObjectCache;
|
||||
class SwapChain
|
||||
{
|
||||
public:
|
||||
SwapChain(void* native_handle, VkSurfaceKHR surface, bool vsync);
|
||||
SwapChain(void* display_handle, void* native_handle, VkSurfaceKHR surface, bool vsync);
|
||||
~SwapChain();
|
||||
|
||||
// Creates a vulkan-renderable surface for the specified window handle.
|
||||
static VkSurfaceKHR CreateVulkanSurface(VkInstance instance, void* hwnd);
|
||||
static VkSurfaceKHR CreateVulkanSurface(VkInstance instance, void* display_handle, void* hwnd);
|
||||
|
||||
// Create a new swap chain from a pre-existing surface.
|
||||
static std::unique_ptr<SwapChain> Create(void* native_handle, VkSurfaceKHR surface, bool vsync);
|
||||
static std::unique_ptr<SwapChain> Create(void* display_handle, void* native_handle,
|
||||
VkSurfaceKHR surface, bool vsync);
|
||||
|
||||
void* GetDisplayHandle() const { return m_display_handle; }
|
||||
void* GetNativeHandle() const { return m_native_handle; }
|
||||
VkSurfaceKHR GetSurface() const { return m_surface; }
|
||||
VkSurfaceFormatKHR GetSurfaceFormat() const { return m_surface_format; }
|
||||
@ -81,6 +83,7 @@ private:
|
||||
VkFramebuffer framebuffer;
|
||||
};
|
||||
|
||||
void* m_display_handle;
|
||||
void* m_native_handle;
|
||||
VkSurfaceKHR m_surface = VK_NULL_HANDLE;
|
||||
VkSurfaceFormatKHR m_surface_format = {};
|
||||
|
Reference in New Issue
Block a user