1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2020 Google Inc. 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci * found in the LICENSE file. 6cb93a386Sopenharmony_ci */ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#ifndef SkSVGFeTurbulence_DEFINED 9cb93a386Sopenharmony_ci#define SkSVGFeTurbulence_DEFINED 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci#include "modules/svg/include/SkSVGFe.h" 12cb93a386Sopenharmony_ci#include "modules/svg/include/SkSVGTypes.h" 13cb93a386Sopenharmony_ci 14cb93a386Sopenharmony_ciclass SkSVGFeTurbulence : public SkSVGFe { 15cb93a386Sopenharmony_cipublic: 16cb93a386Sopenharmony_ci static sk_sp<SkSVGFeTurbulence> Make() { 17cb93a386Sopenharmony_ci return sk_sp<SkSVGFeTurbulence>(new SkSVGFeTurbulence()); 18cb93a386Sopenharmony_ci } 19cb93a386Sopenharmony_ci 20cb93a386Sopenharmony_ci SVG_ATTR(BaseFrequency, SkSVGFeTurbulenceBaseFrequency, SkSVGFeTurbulenceBaseFrequency({})) 21cb93a386Sopenharmony_ci SVG_ATTR(NumOctaves, SkSVGIntegerType, SkSVGIntegerType(1)) 22cb93a386Sopenharmony_ci SVG_ATTR(Seed, SkSVGNumberType, SkSVGNumberType(0)) 23cb93a386Sopenharmony_ci SVG_ATTR(TurbulenceType, 24cb93a386Sopenharmony_ci SkSVGFeTurbulenceType, 25cb93a386Sopenharmony_ci SkSVGFeTurbulenceType(SkSVGFeTurbulenceType::Type::kTurbulence)) 26cb93a386Sopenharmony_ci 27cb93a386Sopenharmony_ciprotected: 28cb93a386Sopenharmony_ci sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&, 29cb93a386Sopenharmony_ci const SkSVGFilterContext&) const override; 30cb93a386Sopenharmony_ci 31cb93a386Sopenharmony_ci std::vector<SkSVGFeInputType> getInputs() const override { return {}; } 32cb93a386Sopenharmony_ci 33cb93a386Sopenharmony_ci bool parseAndSetAttribute(const char*, const char*) override; 34cb93a386Sopenharmony_ciprivate: 35cb93a386Sopenharmony_ci SkSVGFeTurbulence() : INHERITED(SkSVGTag::kFeTurbulence) {} 36cb93a386Sopenharmony_ci 37cb93a386Sopenharmony_ci using INHERITED = SkSVGFe; 38cb93a386Sopenharmony_ci}; 39cb93a386Sopenharmony_ci 40cb93a386Sopenharmony_ci#endif // SkSVGFeTurbulence_DEFINED 41