Flutter Impeller
shader_function_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_RENDERER_BACKEND_VULKAN_SHADER_FUNCTION_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SHADER_FUNCTION_VK_H_
7 
13 
14 namespace impeller {
15 
16 class ShaderFunctionVK final
17  : public ShaderFunction,
18  public BackendCast<ShaderFunctionVK, ShaderFunction> {
19  public:
20  // |ShaderFunction|
21  ~ShaderFunctionVK() override;
22 
23  const vk::ShaderModule& GetModule() const;
24 
25  private:
26  friend class ShaderLibraryVK;
27 
28  vk::UniqueShaderModule module_;
29  std::weak_ptr<DeviceHolderVK> device_holder_;
30 
31  ShaderFunctionVK(const std::weak_ptr<DeviceHolderVK>& device_holder,
32  UniqueID parent_library_id,
33  std::string name,
34  ShaderStage stage,
35  vk::UniqueShaderModule module);
36 
37  ShaderFunctionVK(const ShaderFunctionVK&) = delete;
38 
39  ShaderFunctionVK& operator=(const ShaderFunctionVK&) = delete;
40 };
41 
42 } // namespace impeller
43 
44 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SHADER_FUNCTION_VK_H_
const vk::ShaderModule & GetModule() const