Flutter Engine
The Flutter Engine
GraphiteVulkanTestContext.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef skiatest_graphite_VulkanTestContext_DEFINED
9#define skiatest_graphite_VulkanTestContext_DEFINED
10
12
14
15namespace skiatest::graphite {
16
18public:
19 ~VulkanTestContext() override;
20
21 static std::unique_ptr<GraphiteTestContext> Make();
22
24
26
27 std::unique_ptr<skgpu::graphite::Context> makeContext(const TestOptions&) override;
28
30 return fVulkan;
31 }
32
33private:
37 VkDebugReportCallbackEXT debugCallback,
39 : fVulkan(vulkan)
40 , fExtensions(extensions)
41 , fFeatures(features)
42 , fDebugCallback(debugCallback)
43 , fDestroyDebugReportCallbackEXT(destroyCallback) {}
44
46 const skgpu::VulkanExtensions* fExtensions;
47 const VkPhysicalDeviceFeatures2* fFeatures;
48 VkDebugReportCallbackEXT fDebugCallback = VK_NULL_HANDLE;
49 PFN_vkDestroyDebugReportCallbackEXT fDestroyDebugReportCallbackEXT = nullptr;
50};
51
52} // namespace skiatest::graphite
53
54#endif // skiatest_graphite_VulkanTestContext_DEFINED
std::unique_ptr< skgpu::graphite::Context > makeContext(const TestOptions &) override
const skgpu::VulkanBackendContext & getBackendContext() const
static std::unique_ptr< GraphiteTestContext > Make()
BackendApi
Definition: GpuTypes.h:22
ContextType
Definition: ContextType.h:19
void(VKAPI_PTR * PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks *pAllocator)
#define VK_NULL_HANDLE
Definition: vulkan_core.h:46