Flutter Impeller
sampler_library_mtl.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_METAL_SAMPLER_LIBRARY_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SAMPLER_LIBRARY_MTL_H_
7 
8 #include <Metal/Metal.h>
9 
10 #include <memory>
11 
16 
17 namespace impeller {
18 
19 class SamplerLibraryMTL final
20  : public SamplerLibrary,
21  public BackendCast<SamplerLibraryMTL, SamplerLibrary> {
22  public:
23  // |SamplerLibrary|
24  ~SamplerLibraryMTL() override;
25 
26  private:
27  friend class ContextMTL;
28 
29  id<MTLDevice> device_ = nullptr;
30  SamplerMap samplers_;
31 
32  explicit SamplerLibraryMTL(id<MTLDevice> device);
33 
34  // |SamplerLibrary|
35  const std::unique_ptr<const Sampler>& GetSampler(
36  SamplerDescriptor descriptor) override;
37 
38  SamplerLibraryMTL(const SamplerLibraryMTL&) = delete;
39 
40  SamplerLibraryMTL& operator=(const SamplerLibraryMTL&) = delete;
41 };
42 
43 } // namespace impeller
44 
45 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SAMPLER_LIBRARY_MTL_H_
sampler_library.h
impeller::SamplerLibraryMTL::~SamplerLibraryMTL
~SamplerLibraryMTL() override
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:15
backend_cast.h
sampler_descriptor.h
impeller::SamplerLibraryMTL
Definition: sampler_library_mtl.h:19
comparable.h
impeller::BackendCast
Definition: backend_cast.h:11
impeller::SamplerLibrary
Definition: sampler_library.h:13
impeller::ContextMTL
Definition: context_mtl.h:34
impeller
Definition: aiks_blend_unittests.cc:18
impeller::SamplerMap
std::unordered_map< SamplerDescriptor, std::unique_ptr< const Sampler >, ComparableHash< SamplerDescriptor >, ComparableEqual< SamplerDescriptor > > SamplerMap
Definition: sampler.h:35