mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-17 16:28:06 +03:00
e713de115c
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.
30 lines
668 B
C++
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();
|
|
|
|
}
|