#include "ui/ozone/platform/x11/vulkan_implementation_x11.h"
#include <optional>
#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/functional/callback_helpers.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "base/scoped_environment_variable_override.h"
#include "gpu/vulkan/vulkan_function_pointers.h"
#include "gpu/vulkan/vulkan_image.h"
#include "gpu/vulkan/vulkan_instance.h"
#include "gpu/vulkan/vulkan_surface.h"
#include "gpu/vulkan/vulkan_util.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/gpu_fence.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/x/connection.h"
#include "ui/ozone/platform/x11/vulkan_surface_x11.h"
namespace ui {
VulkanImplementationX11::VulkanImplementationX11(bool use_swiftshader)
: … { … }
VulkanImplementationX11::~VulkanImplementationX11() = default;
bool VulkanImplementationX11::InitializeVulkanInstance(bool using_surface) { … }
gpu::VulkanInstance* VulkanImplementationX11::GetVulkanInstance() { … }
std::unique_ptr<gpu::VulkanSurface> VulkanImplementationX11::CreateViewSurface(
gfx::AcceleratedWidget window) { … }
bool VulkanImplementationX11::GetPhysicalDevicePresentationSupport(
VkPhysicalDevice device,
const std::vector<VkQueueFamilyProperties>& queue_family_properties,
uint32_t queue_family_index) { … }
std::vector<const char*>
VulkanImplementationX11::GetRequiredDeviceExtensions() { … }
std::vector<const char*>
VulkanImplementationX11::GetOptionalDeviceExtensions() { … }
VkFence VulkanImplementationX11::CreateVkFenceForGpuFence(VkDevice vk_device) { … }
std::unique_ptr<gfx::GpuFence> VulkanImplementationX11::ExportVkFenceToGpuFence(
VkDevice vk_device,
VkFence vk_fence) { … }
VkExternalSemaphoreHandleTypeFlagBits
VulkanImplementationX11::GetExternalSemaphoreHandleType() { … }
bool VulkanImplementationX11::CanImportGpuMemoryBuffer(
gpu::VulkanDeviceQueue* device_queue,
gfx::GpuMemoryBufferType memory_buffer_type) { … }
std::unique_ptr<gpu::VulkanImage>
VulkanImplementationX11::CreateImageFromGpuMemoryHandle(
gpu::VulkanDeviceQueue* device_queue,
gfx::GpuMemoryBufferHandle gmb_handle,
gfx::Size size,
VkFormat vk_format,
const gfx::ColorSpace& color_space) { … }
}