/src/skia/modules/svg/include/SkSVGFeGaussianBlur.h
Line | Count | Source (jump to first uncovered line) |
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 SkSVGFeGaussianBlur_DEFINED |
9 | | #define SkSVGFeGaussianBlur_DEFINED |
10 | | |
11 | | #include "include/core/SkRefCnt.h" |
12 | | #include "include/private/base/SkAPI.h" |
13 | | #include "modules/svg/include/SkSVGFe.h" |
14 | | #include "modules/svg/include/SkSVGNode.h" |
15 | | #include "modules/svg/include/SkSVGTypes.h" |
16 | | |
17 | | #include <vector> |
18 | | |
19 | | class SkImageFilter; |
20 | | class SkSVGFilterContext; |
21 | | class SkSVGRenderContext; |
22 | | |
23 | | class SK_API SkSVGFeGaussianBlur : public SkSVGFe { |
24 | | public: |
25 | | struct StdDeviation { |
26 | | SkSVGNumberType fX; |
27 | | SkSVGNumberType fY; |
28 | | }; |
29 | | |
30 | 0 | static sk_sp<SkSVGFeGaussianBlur> Make() { |
31 | 0 | return sk_sp<SkSVGFeGaussianBlur>(new SkSVGFeGaussianBlur()); |
32 | 0 | } |
33 | | |
34 | | SVG_ATTR(StdDeviation, StdDeviation, StdDeviation({0, 0})) |
35 | | |
36 | | protected: |
37 | | sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&, |
38 | | const SkSVGFilterContext&) const override; |
39 | | |
40 | 0 | std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; } |
41 | | |
42 | | bool parseAndSetAttribute(const char*, const char*) override; |
43 | | |
44 | | private: |
45 | 0 | SkSVGFeGaussianBlur() : INHERITED(SkSVGTag::kFeGaussianBlur) {} |
46 | | |
47 | | using INHERITED = SkSVGFe; |
48 | | }; |
49 | | |
50 | | #endif // SkSVGFeGaussianBlur_DEFINED |