#include <DawnSampler.h>
Definition at line 22 of file DawnSampler.h.
◆ ~DawnSampler()
skgpu::graphite::DawnSampler::~DawnSampler |
( |
| ) |
|
|
inlineoverride |
◆ dawnSampler()
const wgpu::Sampler & skgpu::graphite::DawnSampler::dawnSampler |
( |
| ) |
const |
|
inline |
◆ freeGpuData()
void skgpu::graphite::DawnSampler::freeGpuData |
( |
| ) |
|
|
overrideprivatevirtual |
◆ Make()
Definition at line 64 of file DawnSampler.cpp.
67 {
68 wgpu::SamplerDescriptor
desc;
71 desc.magFilter = filter_mode_to_dawn_filter_mode(samplingOptions.
filter);
73 desc.mipmapFilter = mipmap_mode_to_dawn_filter_mode(samplingOptions.
mipmap);
74 desc.lodMinClamp = 0.0f;
76
77 desc.lodMaxClamp = 0.0f;
78 } else {
79 desc.lodMaxClamp = FLT_MAX;
80 }
81 desc.maxAnisotropy = 1;
82 desc.compare = wgpu::CompareFunction::Undefined;
83
84#ifdef SK_DEBUG
85 static const char* tileModeLabels[] = {
86 "Clamp",
87 "Repeat",
88 "Mirror",
89 "Decal"
90 };
91 static const char* minMagFilterLabels[] = {
92 "Nearest",
93 "Linear"
94 };
95 static const char* mipFilterLabels[] = {
96 "MipNone",
97 "MipNearest",
98 "MipLinear"
99 };
100 std::string label;
101 label.append("X").append(tileModeLabels[static_cast<int>(xTileMode)]);
102 label.append("Y").append(tileModeLabels[static_cast<int>(yTileMode)]);
103 label.append(minMagFilterLabels[
static_cast<int>(samplingOptions.
filter)]);
104 label.append(mipFilterLabels[
static_cast<int>(samplingOptions.
mipmap)]);
105 desc.label = label.c_str();
106#endif
107
109 if (!sampler) {
110 return {};
111 }
113}
const SharedContext * sharedContext() const
static wgpu::AddressMode tile_mode_to_dawn_address_mode(SkTileMode tileMode)
const SkFilterMode filter
const SkMipmapMode mipmap
The documentation for this class was generated from the following files: