| Flutter Impeller |

sampler_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_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SAMPLER_MTL_H_
7
8 #include <Metal/Metal.h>
9
10 #include "flutter/fml/macros.h"
11 #include "impeller/base/backend_cast.h"
12 #include "impeller/core/sampler.h"
13
14 namespace impeller {
15
16 class SamplerLibraryMTL;
17
18 class SamplerMTL final : public Sampler,
19 public BackendCast<SamplerMTL, Sampler> {
20 public:
21 SamplerMTL();
22
23 // |Sampler|
24 ~SamplerMTL() override;
25
26 id<MTLSamplerState> GetMTLSamplerState() const;
27
28 private:
29 friend SamplerLibraryMTL;
30
31 id<MTLSamplerState> state_ = nullptr;
32
33 SamplerMTL(SamplerDescriptor desc, id<MTLSamplerState> state);
34
35 // |Sampler|
36 bool IsValid() const override;
37
38 SamplerMTL(const SamplerMTL&) = delete;
39
40 SamplerMTL& operator=(const SamplerMTL&) = delete;
41 };
42
43 } // namespace impeller
44
45 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_SAMPLER_MTL_H_
impeller::SamplerMTL::~SamplerMTL
~SamplerMTL() override
sampler.h
impeller::SamplerMTL::SamplerMTL
SamplerMTL()
impeller::SamplerDescriptor
Definition: sampler_descriptor.h:15
impeller::Sampler
Definition: sampler.h:15
backend_cast.h
impeller::SamplerLibraryMTL
Definition: sampler_library_mtl.h:20
impeller::BackendCast
Definition: backend_cast.h:13
impeller::SamplerMTL
Definition: sampler_mtl.h:18
impeller
Definition: aiks_context.cc:10
impeller::SamplerMTL::GetMTLSamplerState
id< MTLSamplerState > GetMTLSamplerState() const
Definition: sampler_mtl.mm:18