ladybird/Userland/Libraries/LibCore/VulkanContext.h
Aliaksandr Kalenik e713de115c LibWeb+LibCore: Use Vulkan backend for Skia on Linux
Skia now uses GPU-accelerated painting on Linux if Vulkan is available.
Most of the performance gain is currently negated by reading the GPU
backend back into RAM to pass it to the Browser process. In the future,
this could be improved by sharing GPU-allocated memory across the
Browser and WebContent processes.
2024-07-05 07:13:13 +02:00

30 lines
668 B
C++

/*
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#if !defined(USE_VULKAN)
static_assert(false, "This file must only be used when Vulkan is available");
#endif
#include <AK/Forward.h>
#include <AK/Function.h>
#include <vulkan/vulkan.h>
namespace Core {
struct VulkanContext {
uint32_t api_version { VK_API_VERSION_1_0 };
VkInstance instance { VK_NULL_HANDLE };
VkPhysicalDevice physical_device { VK_NULL_HANDLE };
VkDevice logical_device { VK_NULL_HANDLE };
VkQueue graphics_queue { VK_NULL_HANDLE };
};
ErrorOr<VulkanContext> create_vulkan_context();
}