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 #pragma once
6 
7 #include "flutter/fml/macros.h"
12 
13 namespace impeller {
14 
15 class SamplerLibraryVK;
16 
17 class SamplerVK final : public Sampler, public BackendCast<SamplerVK, Sampler> {
18  public:
19  SamplerVK(SamplerDescriptor desc, vk::UniqueSampler sampler);
20 
21  // |Sampler|
22  ~SamplerVK() override;
23 
24  vk::Sampler GetSampler() const;
25 
26  const std::shared_ptr<SharedObjectVKT<vk::Sampler>>& GetSharedSampler() const;
27 
28  private:
29  friend SamplerLibraryVK;
30 
31  std::shared_ptr<SharedObjectVKT<vk::Sampler>> sampler_;
32  bool is_valid_ = false;
33 
34  // |Sampler|
35  bool IsValid() const override;
36 
37  FML_DISALLOW_COPY_AND_ASSIGN(SamplerVK);
38 };
39 
40 } // namespace impeller
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:17
vk.h
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:18
impeller::Sampler
Definition: sampler.h:12
impeller::SamplerLibraryVK
Definition: sampler_library_vk.h:17
backend_cast.h
impeller::SamplerVK::GetSampler
vk::Sampler GetSampler() const
Definition: sampler_vk.cc:17
impeller::BackendCast
Definition: backend_cast.h:12
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