Flutter Engine
The Flutter Engine
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
17namespace impeller {
18
20 : public SamplerLibrary,
21 public BackendCast<SamplerLibraryMTL, SamplerLibrary> {
22 public:
23 // |SamplerLibrary|
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_
VkDevice device
Definition: main.cc:53
std::unordered_map< SamplerDescriptor, std::unique_ptr< const Sampler >, ComparableHash< SamplerDescriptor >, ComparableEqual< SamplerDescriptor > > SamplerMap
Definition: sampler.h:35