MCPcopy Create free account
hub / github.com/Snapchat/Valdi / makeSmaplingOptions

Function makeSmaplingOptions

snap_drawing/src/snap_drawing/cpp/Drawing/Shader.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace snap::drawing {
14
15static SkSamplingOptions makeSmaplingOptions(FilterQuality quality) {
16 switch (quality) {
17 case FilterQualityNone:
18 return SkSamplingOptions();
19 case FilterQualityLow:
20 return SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kNone);
21 case FilterQualityMedium:
22 return SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kLinear);
23 case FilterQualityHigh:
24 return SkSamplingOptions(SkCubicResampler::Mitchell());
25 }
26}
27
28Shader::Shader() : Shader(nullptr) {}
29

Callers 1

makeImageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected