Flutter Engine
 
Loading...
Searching...
No Matches
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 std::vector<std::pair<uint64_t, std::shared_ptr<const Sampler>>> samplers_;
31
32 explicit SamplerLibraryMTL(id<MTLDevice> device);
33
34 // |SamplerLibrary|
35 raw_ptr<const Sampler> GetSampler(
36 const 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_
A wrapper around a raw ptr that adds additional unopt mode only checks.
Definition raw_ptr.h:15
VkDevice device
Definition main.cc:69