19 SkSVGAttributeParser::parse<SkSVGIntegerType>(
"numOctaves",
name,
value)) ||
20 this->setSeed(SkSVGAttributeParser::parse<SkSVGNumberType>(
"seed",
name,
value)) ||
21 this->setBaseFrequency(SkSVGAttributeParser::parse<SkSVGFeTurbulenceBaseFrequency>(
23 this->setTurbulenceType(SkSVGAttributeParser::parse<SkSVGFeTurbulenceType>(
28bool SkSVGAttributeParser::parse<SkSVGFeTurbulenceBaseFrequency>(
31 if (!this->
parse(&freqX)) {
36 this->parseCommaWspToken();
37 if (this->
parse(&freqY)) {
43 return this->parseEOSToken();
48 bool parsedValue =
false;
50 if (this->parseExpectedStringToken(
"fractalNoise")) {
53 }
else if (this->parseExpectedStringToken(
"turbulence")) {
58 return parsedValue && this->parseEOSToken();
63 const SkISize* tileSize =
nullptr;
66 switch (fTurbulenceType.fType) {
67 case SkSVGFeTurbulenceType::Type::kTurbulence:
69 fBaseFrequency.freqX(), fBaseFrequency.freqY(), fNumOctaves, fSeed, tileSize);
71 case SkSVGFeTurbulenceType::Type::kFractalNoise:
73 fBaseFrequency.freqX(), fBaseFrequency.freqY(), fNumOctaves, fSeed, tileSize);
static sk_sp< SkImageFilter > Shader(sk_sp< SkShader > shader, const CropRect &cropRect={})
bool parse(SkSVGIntegerType *v)
bool parseAndSetAttribute(const char *, const char *) override
SkRect resolveFilterSubregion(const SkSVGRenderContext &, const SkSVGFilterContext &) const
bool parseAndSetAttribute(const char *, const char *) override
virtual sk_sp< SkImageFilter > onMakeImageFilter(const SkSVGRenderContext &, const SkSVGFilterContext &) const =0
SK_API sk_sp< SkShader > MakeTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr)
SK_API sk_sp< SkShader > MakeFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr)
DEF_SWITCHES_START aot vmservice shared library name