1 /* 2 * Copyright 2020 Google Inc. 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 SkSVGFeFlood_DEFINED 9 #define SkSVGFeFlood_DEFINED 10 11 #include "include/core/SkColor.h" 12 #include "include/core/SkRefCnt.h" 13 #include "include/private/base/SkAPI.h" 14 #include "modules/svg/include/SkSVGFe.h" 15 #include "modules/svg/include/SkSVGNode.h" 16 #include "modules/svg/include/SkSVGTypes.h" 17 18 #include <vector> 19 20 class SkImageFilter; 21 class SkSVGFilterContext; 22 class SkSVGRenderContext; 23 24 class SK_API SkSVGFeFlood : public SkSVGFe { 25 public: Make()26 static sk_sp<SkSVGFeFlood> Make() { return sk_sp<SkSVGFeFlood>(new SkSVGFeFlood()); } 27 28 protected: 29 sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&, 30 const SkSVGFilterContext&) const override; 31 getInputs()32 std::vector<SkSVGFeInputType> getInputs() const override { return {}; } 33 34 private: SkSVGFeFlood()35 SkSVGFeFlood() : INHERITED(SkSVGTag::kFeFlood) {} 36 37 SkColor resolveFloodColor(const SkSVGRenderContext&) const; 38 39 using INHERITED = SkSVGFe; 40 }; 41 42 #endif // SkSVGFeFlood_DEFINED 43