Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
MtlSampler.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef skgpu_graphite_MtlSampler_DEFINED
9#define skgpu_graphite_MtlSampler_DEFINED
10
12
16
17#import <Metal/Metal.h>
18
20
21namespace skgpu::graphite {
22
23class MtlSharedContext;
24
25class MtlSampler : public Sampler {
26public:
28 const SkSamplingOptions& samplingOptions,
29 SkTileMode xTileMode,
30 SkTileMode yTileMode);
31
32 ~MtlSampler() override {}
33
34 id<MTLSamplerState> mtlSamplerState() const { return fSamplerState.get(); }
35
36private:
38 sk_cfp<id<MTLSamplerState>>);
39
40 void freeGpuData() override;
41
42 sk_cfp<id<MTLSamplerState>> fSamplerState;
43};
44
45} // namepsace skgpu::graphite
46
47#endif // skgpu_graphite_MtlSampler_DEFINED
SkTileMode
Definition SkTileMode.h:13
void freeGpuData() override
static sk_sp< MtlSampler > Make(const MtlSharedContext *, const SkSamplingOptions &samplingOptions, SkTileMode xTileMode, SkTileMode yTileMode)
Definition MtlSampler.mm:47
id< MTLSamplerState > mtlSamplerState() const
Definition MtlSampler.h:34
const SharedContext * sharedContext() const
Definition Resource.h:187