| Flutter Impeller |

sampler_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_SAMPLER_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SAMPLER_VK_H_
7
8 #include "flutter/fml/macros.h"
9 #include "impeller/base/backend_cast.h"
10 #include "impeller/core/sampler.h"
11 #include "impeller/renderer/backend/vulkan/shared_object_vk.h"
12 #include "impeller/renderer/backend/vulkan/vk.h"
13
14 namespace impeller {
15
16 class SamplerLibraryVK;
17
18 class SamplerVK final : public Sampler, public BackendCast<SamplerVK, Sampler> {
19 public:
20 SamplerVK(SamplerDescriptor desc, vk::UniqueSampler sampler);
21
22 // |Sampler|
23 ~SamplerVK() override;
24
25 vk::Sampler GetSampler() const;
26
27 const std::shared_ptr<SharedObjectVKT<vk::Sampler>>& GetSharedSampler() const;
28
29 private:
30 friend SamplerLibraryVK;
31
32 std::shared_ptr<SharedObjectVKT<vk::Sampler>> sampler_;
33 bool is_valid_ = false;
34
35 // |Sampler|
36 bool IsValid() const override;
37
38 SamplerVK(const SamplerVK&) = delete;
39
40 SamplerVK& operator=(const SamplerVK&) = delete;
41 };
42
43 } // namespace impeller
44
45 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_SAMPLER_VK_H_
impeller::SamplerVK::SamplerVK
SamplerVK(SamplerDescriptor desc, vk::UniqueSampler sampler)
Definition: sampler_vk.cc:9
shared_object_vk.h
sampler.h
impeller::SamplerVK
Definition: sampler_vk.h:18
vk.h
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:15
impeller::Sampler
Definition: sampler.h:15
impeller::SamplerLibraryVK
Definition: sampler_library_vk.h:15
backend_cast.h
impeller::SamplerVK::GetSampler
vk::Sampler GetSampler() const
Definition: sampler_vk.cc:17
impeller::BackendCast
Definition: backend_cast.h:13
impeller::SamplerVK::~SamplerVK
~SamplerVK() override
impeller
Definition: aiks_context.cc:10
impeller::SamplerVK::GetSharedSampler
const std::shared_ptr< SharedObjectVKT< vk::Sampler > > & GetSharedSampler() const
Definition: sampler_vk.cc:22