Flutter Engine
 
Loading...
Searching...
No Matches
context_vk.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_BACKEND_VULKAN_CONTEXT_VK_H_
6#define FLUTTER_IMPELLER_TOOLKIT_INTEROP_BACKEND_VULKAN_CONTEXT_VK_H_
7
11
12namespace impeller::interop {
13
14class ContextVK final : public Context {
15 public:
16 struct Settings {
17 std::function<PFN_vkVoidFunction(VkInstance instance,
18 const char* proc_name)>
20 bool enable_validation = false;
21
22 explicit Settings(const ImpellerContextVulkanSettings& settings);
23
24 bool IsValid() const;
25 };
26
27 static ScopedObject<Context> Create(const Settings& settings);
28
30 std::shared_ptr<impeller::Context> context);
31
32 // |Context|
33 ~ContextVK() override;
34
35 ContextVK(const ContextVK&) = delete;
36
37 ContextVK& operator=(const ContextVK&) = delete;
38
39 bool GetInfo(ImpellerContextVulkanInfo& info) const;
40
41 private:
42 explicit ContextVK(std::shared_ptr<impeller::Context> context);
43};
44
45} // namespace impeller::interop
46
47#endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_BACKEND_VULKAN_CONTEXT_VK_H_
ContextVK(const ContextVK &)=delete
ContextVK & operator=(const ContextVK &)=delete
bool GetInfo(ImpellerContextVulkanInfo &info) const
Definition context_vk.cc:97
static ScopedObject< Context > Create(const Settings &settings)
Definition context_vk.cc:44
VkInstance instance
Definition main.cc:64
std::function< PFN_vkVoidFunction(VkInstance instance, const char *proc_name)> instance_proc_address_callback
Definition context_vk.h:19