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 #pragma once
6 
7 #include <Metal/Metal.h>
8 
9 #include <memory>
10 
11 #include "flutter/fml/macros.h"
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  SamplerLibraryMTL(id<MTLDevice> device);
33 
34  // |SamplerLibrary|
35  std::shared_ptr<const Sampler> GetSampler(
36  SamplerDescriptor descriptor) override;
37 
38  FML_DISALLOW_COPY_AND_ASSIGN(SamplerLibraryMTL);
39 };
40 
41 } // namespace impeller
sampler_library.h
impeller::SamplerLibraryMTL::~SamplerLibraryMTL
~SamplerLibraryMTL() override
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:18
impeller::SamplerMap
std::unordered_map< SamplerDescriptor, std::shared_ptr< const Sampler >, ComparableHash< SamplerDescriptor >, ComparableEqual< SamplerDescriptor > > SamplerMap
Definition: sampler_descriptor.h:56
backend_cast.h
sampler_descriptor.h
impeller::SamplerLibraryMTL
Definition: sampler_library_mtl.h:19
comparable.h
impeller::BackendCast
Definition: backend_cast.h:12
impeller::SamplerLibrary
Definition: sampler_library.h:14
impeller::ContextMTL
Definition: context_mtl.h:32
impeller
Definition: aiks_context.cc:10