Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
DawnSampler.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_DawnSampler_DEFINED
9#define skgpu_graphite_DawnSampler_DEFINED
10
12
14#include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
15
17
18namespace skgpu::graphite {
19
20class DawnSharedContext;
21
22class DawnSampler : public Sampler {
23public:
25 const SkSamplingOptions& samplingOptions,
26 SkTileMode xTileMode,
27 SkTileMode yTileMode);
28 ~DawnSampler() override {}
29
30 const wgpu::Sampler& dawnSampler() const { return fSampler; }
31
32private:
34 wgpu::Sampler sampler);
35
36 void freeGpuData() override;
37
38 wgpu::Sampler fSampler;
39};
40
41} // namepsace skgpu::graphite
42
43#endif // skgpu_graphite_DawnSampler_DEFINED
SkTileMode
Definition SkTileMode.h:13
const wgpu::Sampler & dawnSampler() const
Definition DawnSampler.h:30
static sk_sp< DawnSampler > Make(const DawnSharedContext *, const SkSamplingOptions &samplingOptions, SkTileMode xTileMode, SkTileMode yTileMode)
const SharedContext * sharedContext() const
Definition Resource.h:187