Coverage Report

Created: 2024-05-20 07:14

/src/skia/modules/svg/include/SkSVGAttributeParser.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2016 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 SkSVGAttributeParser_DEFINED
9
#define SkSVGAttributeParser_DEFINED
10
11
#include <vector>
12
13
#include "include/private/base/SkNoncopyable.h"
14
#include "modules/svg/include/SkSVGTypes.h"
15
#include "src/base/SkTLazy.h"
16
17
class SkSVGAttributeParser : public SkNoncopyable {
18
public:
19
    SkSVGAttributeParser(const char[]);
20
21
    bool parseInteger(SkSVGIntegerType*);
22
    bool parseViewBox(SkSVGViewBoxType*);
23
    bool parsePreserveAspectRatio(SkSVGPreserveAspectRatio*);
24
25
    // TODO: Migrate all parse*() functions to this style (and delete the old version)
26
    //      so they can be used by parse<T>():
27
0
    bool parse(SkSVGIntegerType* v) { return parseInteger(v); }
28
29
    template <typename T> using ParseResult = SkTLazy<T>;
30
31
11.6k
    template <typename T> static ParseResult<T> parse(const char* value) {
32
11.6k
        ParseResult<T> result;
33
11.6k
        T parsedValue;
34
11.6k
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
3.08k
            result.set(std::move(parsedValue));
36
3.08k
        }
37
11.6k
        return result;
38
11.6k
    }
SkTLazy<SkSVGLength> SkSVGAttributeParser::parse<SkSVGLength>(char const*)
Line
Count
Source
31
7.05k
    template <typename T> static ParseResult<T> parse(const char* value) {
32
7.05k
        ParseResult<T> result;
33
7.05k
        T parsedValue;
34
7.05k
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
1.24k
            result.set(std::move(parsedValue));
36
1.24k
        }
37
7.05k
        return result;
38
7.05k
    }
SkTLazy<SkSVGObjectBoundingBoxUnits> SkSVGAttributeParser::parse<SkSVGObjectBoundingBoxUnits>(char const*)
Line
Count
Source
31
4
    template <typename T> static ParseResult<T> parse(const char* value) {
32
4
        ParseResult<T> result;
33
4
        T parsedValue;
34
4
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
0
            result.set(std::move(parsedValue));
36
0
        }
37
4
        return result;
38
4
    }
SkTLazy<SkMatrix> SkSVGAttributeParser::parse<SkMatrix>(char const*)
Line
Count
Source
31
168
    template <typename T> static ParseResult<T> parse(const char* value) {
32
168
        ParseResult<T> result;
33
168
        T parsedValue;
34
168
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
8
            result.set(std::move(parsedValue));
36
8
        }
37
168
        return result;
38
168
    }
Unexecuted instantiation: SkTLazy<SkSVGIRI> SkSVGAttributeParser::parse<SkSVGIRI>(char const*)
SkTLazy<SkSVGFeInputType> SkSVGAttributeParser::parse<SkSVGFeInputType>(char const*)
Line
Count
Source
31
4
    template <typename T> static ParseResult<T> parse(const char* value) {
32
4
        ParseResult<T> result;
33
4
        T parsedValue;
34
4
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
4
            result.set(std::move(parsedValue));
36
4
        }
37
4
        return result;
38
4
    }
SkTLazy<SkString> SkSVGAttributeParser::parse<SkString>(char const*)
Line
Count
Source
31
1
    template <typename T> static ParseResult<T> parse(const char* value) {
32
1
        ParseResult<T> result;
33
1
        T parsedValue;
34
1
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
1
            result.set(std::move(parsedValue));
36
1
        }
37
1
        return result;
38
1
    }
Unexecuted instantiation: SkTLazy<SkSVGFeBlend::Mode> SkSVGAttributeParser::parse<SkSVGFeBlend::Mode>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeColorMatrixType> SkSVGAttributeParser::parse<SkSVGFeColorMatrixType>(char const*)
SkTLazy<std::__1::vector<float, std::__1::allocator<float> > > SkSVGAttributeParser::parse<std::__1::vector<float, std::__1::allocator<float> > >(char const*)
Line
Count
Source
31
182
    template <typename T> static ParseResult<T> parse(const char* value) {
32
182
        ParseResult<T> result;
33
182
        T parsedValue;
34
182
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
55
            result.set(std::move(parsedValue));
36
55
        }
37
182
        return result;
38
182
    }
SkTLazy<float> SkSVGAttributeParser::parse<float>(char const*)
Line
Count
Source
31
221
    template <typename T> static ParseResult<T> parse(const char* value) {
32
221
        ParseResult<T> result;
33
221
        T parsedValue;
34
221
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
220
            result.set(std::move(parsedValue));
36
220
        }
37
221
        return result;
38
221
    }
Unexecuted instantiation: SkTLazy<SkSVGFeFuncType> SkSVGAttributeParser::parse<SkSVGFeFuncType>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeCompositeOperator> SkSVGAttributeParser::parse<SkSVGFeCompositeOperator>(char const*)
Unexecuted instantiation: SkTLazy<SkColorChannel> SkSVGAttributeParser::parse<SkColorChannel>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeGaussianBlur::StdDeviation> SkSVGAttributeParser::parse<SkSVGFeGaussianBlur::StdDeviation>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGPreserveAspectRatio> SkSVGAttributeParser::parse<SkSVGPreserveAspectRatio>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeLighting::KernelUnitLength> SkSVGAttributeParser::parse<SkSVGFeLighting::KernelUnitLength>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeMorphology::Operator> SkSVGAttributeParser::parse<SkSVGFeMorphology::Operator>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeMorphology::Radius> SkSVGAttributeParser::parse<SkSVGFeMorphology::Radius>(char const*)
Unexecuted instantiation: SkTLazy<int> SkSVGAttributeParser::parse<int>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeTurbulenceBaseFrequency> SkSVGAttributeParser::parse<SkSVGFeTurbulenceBaseFrequency>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeTurbulenceType> SkSVGAttributeParser::parse<SkSVGFeTurbulenceType>(char const*)
SkTLazy<SkSVGFuncIRI> SkSVGAttributeParser::parse<SkSVGFuncIRI>(char const*)
Line
Count
Source
31
71
    template <typename T> static ParseResult<T> parse(const char* value) {
32
71
        ParseResult<T> result;
33
71
        T parsedValue;
34
71
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
70
            result.set(std::move(parsedValue));
36
70
        }
37
71
        return result;
38
71
    }
SkTLazy<SkSVGFillRule> SkSVGAttributeParser::parse<SkSVGFillRule>(char const*)
Line
Count
Source
31
4
    template <typename T> static ParseResult<T> parse(const char* value) {
32
4
        ParseResult<T> result;
33
4
        T parsedValue;
34
4
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
0
            result.set(std::move(parsedValue));
36
0
        }
37
4
        return result;
38
4
    }
Unexecuted instantiation: SkTLazy<unsigned int> SkSVGAttributeParser::parse<unsigned int>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGColorspace> SkSVGAttributeParser::parse<SkSVGColorspace>(char const*)
SkTLazy<SkSVGDisplay> SkSVGAttributeParser::parse<SkSVGDisplay>(char const*)
Line
Count
Source
31
233
    template <typename T> static ParseResult<T> parse(const char* value) {
32
233
        ParseResult<T> result;
33
233
        T parsedValue;
34
233
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
35
            result.set(std::move(parsedValue));
36
35
        }
37
233
        return result;
38
233
    }
SkTLazy<SkSVGPaint> SkSVGAttributeParser::parse<SkSVGPaint>(char const*)
Line
Count
Source
31
752
    template <typename T> static ParseResult<T> parse(const char* value) {
32
752
        ParseResult<T> result;
33
752
        T parsedValue;
34
752
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
304
            result.set(std::move(parsedValue));
36
304
        }
37
752
        return result;
38
752
    }
SkTLazy<SkSVGColor> SkSVGAttributeParser::parse<SkSVGColor>(char const*)
Line
Count
Source
31
68
    template <typename T> static ParseResult<T> parse(const char* value) {
32
68
        ParseResult<T> result;
33
68
        T parsedValue;
34
68
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
0
            result.set(std::move(parsedValue));
36
0
        }
37
68
        return result;
38
68
    }
SkTLazy<SkSVGFontFamily> SkSVGAttributeParser::parse<SkSVGFontFamily>(char const*)
Line
Count
Source
31
6
    template <typename T> static ParseResult<T> parse(const char* value) {
32
6
        ParseResult<T> result;
33
6
        T parsedValue;
34
6
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
6
            result.set(std::move(parsedValue));
36
6
        }
37
6
        return result;
38
6
    }
Unexecuted instantiation: SkTLazy<SkSVGFontSize> SkSVGAttributeParser::parse<SkSVGFontSize>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGFontStyle> SkSVGAttributeParser::parse<SkSVGFontStyle>(char const*)
SkTLazy<SkSVGFontWeight> SkSVGAttributeParser::parse<SkSVGFontWeight>(char const*)
Line
Count
Source
31
4
    template <typename T> static ParseResult<T> parse(const char* value) {
32
4
        ParseResult<T> result;
33
4
        T parsedValue;
34
4
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
4
            result.set(std::move(parsedValue));
36
4
        }
37
4
        return result;
38
4
    }
SkTLazy<SkSVGDashArray> SkSVGAttributeParser::parse<SkSVGDashArray>(char const*)
Line
Count
Source
31
333
    template <typename T> static ParseResult<T> parse(const char* value) {
32
333
        ParseResult<T> result;
33
333
        T parsedValue;
34
333
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
322
            result.set(std::move(parsedValue));
36
322
        }
37
333
        return result;
38
333
    }
SkTLazy<SkSVGLineCap> SkSVGAttributeParser::parse<SkSVGLineCap>(char const*)
Line
Count
Source
31
4
    template <typename T> static ParseResult<T> parse(const char* value) {
32
4
        ParseResult<T> result;
33
4
        T parsedValue;
34
4
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
1
            result.set(std::move(parsedValue));
36
1
        }
37
4
        return result;
38
4
    }
SkTLazy<SkSVGLineJoin> SkSVGAttributeParser::parse<SkSVGLineJoin>(char const*)
Line
Count
Source
31
131
    template <typename T> static ParseResult<T> parse(const char* value) {
32
131
        ParseResult<T> result;
33
131
        T parsedValue;
34
131
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
6
            result.set(std::move(parsedValue));
36
6
        }
37
131
        return result;
38
131
    }
Unexecuted instantiation: SkTLazy<SkSVGTextAnchor> SkSVGAttributeParser::parse<SkSVGTextAnchor>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGVisibility> SkSVGAttributeParser::parse<SkSVGVisibility>(char const*)
SkTLazy<SkPath> SkSVGAttributeParser::parse<SkPath>(char const*)
Line
Count
Source
31
2.21k
    template <typename T> static ParseResult<T> parse(const char* value) {
32
2.21k
        ParseResult<T> result;
33
2.21k
        T parsedValue;
34
2.21k
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
777
            result.set(std::move(parsedValue));
36
777
        }
37
2.21k
        return result;
38
2.21k
    }
SkTLazy<std::__1::vector<SkPoint, std::__1::allocator<SkPoint> > > SkSVGAttributeParser::parse<std::__1::vector<SkPoint, std::__1::allocator<SkPoint> > >(char const*)
Line
Count
Source
31
144
    template <typename T> static ParseResult<T> parse(const char* value) {
32
144
        ParseResult<T> result;
33
144
        T parsedValue;
34
144
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
0
            result.set(std::move(parsedValue));
36
0
        }
37
144
        return result;
38
144
    }
SkTLazy<std::__1::vector<SkSVGLength, std::__1::allocator<SkSVGLength> > > SkSVGAttributeParser::parse<std::__1::vector<SkSVGLength, std::__1::allocator<SkSVGLength> > >(char const*)
Line
Count
Source
31
42
    template <typename T> static ParseResult<T> parse(const char* value) {
32
42
        ParseResult<T> result;
33
42
        T parsedValue;
34
42
        if (SkSVGAttributeParser(value).parse(&parsedValue)) {
35
24
            result.set(std::move(parsedValue));
36
24
        }
37
42
        return result;
38
42
    }
Unexecuted instantiation: SkTLazy<SkSVGXmlSpace> SkSVGAttributeParser::parse<SkSVGXmlSpace>(char const*)
Unexecuted instantiation: SkTLazy<SkSVGSpreadMethod> SkSVGAttributeParser::parse<SkSVGSpreadMethod>(char const*)
39
40
    template <typename T>
41
    static ParseResult<T> parse(const char* expectedName,
42
                                const char* name,
43
49.0k
                                const char* value) {
44
49.0k
        if (!strcmp(name, expectedName)) {
45
5.97k
            return parse<T>(value);
46
5.97k
        }
47
48
43.1k
        return ParseResult<T>();
49
49.0k
    }
SkTLazy<SkSVGLength> SkSVGAttributeParser::parse<SkSVGLength>(char const*, char const*, char const*)
Line
Count
Source
43
33.8k
                                const char* value) {
44
33.8k
        if (!strcmp(name, expectedName)) {
45
3.38k
            return parse<T>(value);
46
3.38k
        }
47
48
30.4k
        return ParseResult<T>();
49
33.8k
    }
SkTLazy<SkSVGFeInputType> SkSVGAttributeParser::parse<SkSVGFeInputType>(char const*, char const*, char const*)
Line
Count
Source
43
13
                                const char* value) {
44
13
        if (!strcmp(name, expectedName)) {
45
4
            return parse<T>(value);
46
4
        }
47
48
9
        return ParseResult<T>();
49
13
    }
SkTLazy<SkString> SkSVGAttributeParser::parse<SkString>(char const*, char const*, char const*)
Line
Count
Source
43
6
                                const char* value) {
44
6
        if (!strcmp(name, expectedName)) {
45
1
            return parse<T>(value);
46
1
        }
47
48
5
        return ParseResult<T>();
49
6
    }
Unexecuted instantiation: SkTLazy<SkSVGFeBlend::Mode> SkSVGAttributeParser::parse<SkSVGFeBlend::Mode>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeColorMatrixType> SkSVGAttributeParser::parse<SkSVGFeColorMatrixType>(char const*, char const*, char const*)
SkTLazy<std::__1::vector<float, std::__1::allocator<float> > > SkSVGAttributeParser::parse<std::__1::vector<float, std::__1::allocator<float> > >(char const*, char const*, char const*)
Line
Count
Source
43
946
                                const char* value) {
44
946
        if (!strcmp(name, expectedName)) {
45
182
            return parse<T>(value);
46
182
        }
47
48
764
        return ParseResult<T>();
49
946
    }
SkTLazy<float> SkSVGAttributeParser::parse<float>(char const*, char const*, char const*)
Line
Count
Source
43
13
                                const char* value) {
44
13
        if (!strcmp(name, expectedName)) {
45
1
            return parse<T>(value);
46
1
        }
47
48
12
        return ParseResult<T>();
49
13
    }
Unexecuted instantiation: SkTLazy<SkSVGFeFuncType> SkSVGAttributeParser::parse<SkSVGFeFuncType>(char const*, char const*, char const*)
SkTLazy<SkSVGFeCompositeOperator> SkSVGAttributeParser::parse<SkSVGFeCompositeOperator>(char const*, char const*, char const*)
Line
Count
Source
43
3
                                const char* value) {
44
3
        if (!strcmp(name, expectedName)) {
45
0
            return parse<T>(value);
46
0
        }
47
48
3
        return ParseResult<T>();
49
3
    }
Unexecuted instantiation: SkTLazy<SkColorChannel> SkSVGAttributeParser::parse<SkColorChannel>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeGaussianBlur::StdDeviation> SkSVGAttributeParser::parse<SkSVGFeGaussianBlur::StdDeviation>(char const*, char const*, char const*)
SkTLazy<SkSVGIRI> SkSVGAttributeParser::parse<SkSVGIRI>(char const*, char const*, char const*)
Line
Count
Source
43
1.19k
                                const char* value) {
44
1.19k
        if (!strcmp(name, expectedName)) {
45
0
            return parse<T>(value);
46
0
        }
47
48
1.19k
        return ParseResult<T>();
49
1.19k
    }
Unexecuted instantiation: SkTLazy<SkSVGPreserveAspectRatio> SkSVGAttributeParser::parse<SkSVGPreserveAspectRatio>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeLighting::KernelUnitLength> SkSVGAttributeParser::parse<SkSVGFeLighting::KernelUnitLength>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeMorphology::Operator> SkSVGAttributeParser::parse<SkSVGFeMorphology::Operator>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeMorphology::Radius> SkSVGAttributeParser::parse<SkSVGFeMorphology::Radius>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<int> SkSVGAttributeParser::parse<int>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeTurbulenceBaseFrequency> SkSVGAttributeParser::parse<SkSVGFeTurbulenceBaseFrequency>(char const*, char const*, char const*)
Unexecuted instantiation: SkTLazy<SkSVGFeTurbulenceType> SkSVGAttributeParser::parse<SkSVGFeTurbulenceType>(char const*, char const*, char const*)
SkTLazy<SkSVGObjectBoundingBoxUnits> SkSVGAttributeParser::parse<SkSVGObjectBoundingBoxUnits>(char const*, char const*, char const*)
Line
Count
Source
43
5.06k
                                const char* value) {
44
5.06k
        if (!strcmp(name, expectedName)) {
45
4
            return parse<T>(value);
46
4
        }
47
48
5.06k
        return ParseResult<T>();
49
5.06k
    }
SkTLazy<SkPath> SkSVGAttributeParser::parse<SkPath>(char const*, char const*, char const*)
Line
Count
Source
43
2.36k
                                const char* value) {
44
2.36k
        if (!strcmp(name, expectedName)) {
45
2.21k
            return parse<T>(value);
46
2.21k
        }
47
48
157
        return ParseResult<T>();
49
2.36k
    }
SkTLazy<SkMatrix> SkSVGAttributeParser::parse<SkMatrix>(char const*, char const*, char const*)
Line
Count
Source
43
617
                                const char* value) {
44
617
        if (!strcmp(name, expectedName)) {
45
0
            return parse<T>(value);
46
0
        }
47
48
617
        return ParseResult<T>();
49
617
    }
SkTLazy<std::__1::vector<SkPoint, std::__1::allocator<SkPoint> > > SkSVGAttributeParser::parse<std::__1::vector<SkPoint, std::__1::allocator<SkPoint> > >(char const*, char const*, char const*)
Line
Count
Source
43
144
                                const char* value) {
44
144
        if (!strcmp(name, expectedName)) {
45
144
            return parse<T>(value);
46
144
        }
47
48
0
        return ParseResult<T>();
49
144
    }
SkTLazy<std::__1::vector<SkSVGLength, std::__1::allocator<SkSVGLength> > > SkSVGAttributeParser::parse<std::__1::vector<SkSVGLength, std::__1::allocator<SkSVGLength> > >(char const*, char const*, char const*)
Line
Count
Source
43
3.81k
                                const char* value) {
44
3.81k
        if (!strcmp(name, expectedName)) {
45
42
            return parse<T>(value);
46
42
        }
47
48
3.76k
        return ParseResult<T>();
49
3.81k
    }
SkTLazy<SkSVGXmlSpace> SkSVGAttributeParser::parse<SkSVGXmlSpace>(char const*, char const*, char const*)
Line
Count
Source
43
891
                                const char* value) {
44
891
        if (!strcmp(name, expectedName)) {
45
0
            return parse<T>(value);
46
0
        }
47
48
891
        return ParseResult<T>();
49
891
    }
SkTLazy<SkSVGSpreadMethod> SkSVGAttributeParser::parse<SkSVGSpreadMethod>(char const*, char const*, char const*)
Line
Count
Source
43
159
                                const char* value) {
44
159
        if (!strcmp(name, expectedName)) {
45
0
            return parse<T>(value);
46
0
        }
47
48
159
        return ParseResult<T>();
49
159
    }
50
51
    template <typename PropertyT>
52
    static ParseResult<PropertyT> parseProperty(const char* expectedName,
53
                                                const char* name,
54
417k
                                                const char* value) {
55
417k
        if (strcmp(name, expectedName) != 0) {
56
415k
            return ParseResult<PropertyT>();
57
415k
        }
58
59
1.97k
        if (!strcmp(value, "inherit")) {
60
81
            PropertyT result(SkSVGPropertyState::kInherit);
61
81
            return ParseResult<PropertyT>(&result);
62
81
        }
63
64
1.89k
        auto pr = parse<typename PropertyT::ValueT>(value);
65
1.89k
        if (pr.isValid()) {
66
1.02k
            PropertyT result(*pr);
67
1.02k
            return ParseResult<PropertyT>(&result);
68
1.02k
        }
69
70
868
        return ParseResult<PropertyT>();
71
1.89k
    }
SkTLazy<SkSVGProperty<SkSVGFuncIRI, false> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGFuncIRI, false> >(char const*, char const*, char const*)
Line
Count
Source
54
41.1k
                                                const char* value) {
55
41.1k
        if (strcmp(name, expectedName) != 0) {
56
41.1k
            return ParseResult<PropertyT>();
57
41.1k
        }
58
59
71
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
71
        auto pr = parse<typename PropertyT::ValueT>(value);
65
71
        if (pr.isValid()) {
66
70
            PropertyT result(*pr);
67
70
            return ParseResult<PropertyT>(&result);
68
70
        }
69
70
1
        return ParseResult<PropertyT>();
71
71
    }
SkTLazy<SkSVGProperty<SkSVGFillRule, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGFillRule, true> >(char const*, char const*, char const*)
Line
Count
Source
54
27.5k
                                                const char* value) {
55
27.5k
        if (strcmp(name, expectedName) != 0) {
56
27.5k
            return ParseResult<PropertyT>();
57
27.5k
        }
58
59
4
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
4
        auto pr = parse<typename PropertyT::ValueT>(value);
65
4
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
4
        return ParseResult<PropertyT>();
71
4
    }
SkTLazy<SkSVGProperty<unsigned int, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<unsigned int, true> >(char const*, char const*, char const*)
Line
Count
Source
54
13.9k
                                                const char* value) {
55
13.9k
        if (strcmp(name, expectedName) != 0) {
56
13.9k
            return ParseResult<PropertyT>();
57
13.9k
        }
58
59
0
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
0
        auto pr = parse<typename PropertyT::ValueT>(value);
65
0
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
0
        return ParseResult<PropertyT>();
71
0
    }
SkTLazy<SkSVGProperty<SkSVGColorspace, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGColorspace, true> >(char const*, char const*, char const*)
Line
Count
Source
54
27.8k
                                                const char* value) {
55
27.8k
        if (strcmp(name, expectedName) != 0) {
56
27.8k
            return ParseResult<PropertyT>();
57
27.8k
        }
58
59
0
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
0
        auto pr = parse<typename PropertyT::ValueT>(value);
65
0
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
0
        return ParseResult<PropertyT>();
71
0
    }
SkTLazy<SkSVGProperty<SkSVGDisplay, false> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGDisplay, false> >(char const*, char const*, char const*)
Line
Count
Source
54
13.9k
                                                const char* value) {
55
13.9k
        if (strcmp(name, expectedName) != 0) {
56
13.7k
            return ParseResult<PropertyT>();
57
13.7k
        }
58
59
233
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
233
        auto pr = parse<typename PropertyT::ValueT>(value);
65
233
        if (pr.isValid()) {
66
35
            PropertyT result(*pr);
67
35
            return ParseResult<PropertyT>(&result);
68
35
        }
69
70
198
        return ParseResult<PropertyT>();
71
233
    }
SkTLazy<SkSVGProperty<SkSVGPaint, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGPaint, true> >(char const*, char const*, char const*)
Line
Count
Source
54
27.2k
                                                const char* value) {
55
27.2k
        if (strcmp(name, expectedName) != 0) {
56
26.4k
            return ParseResult<PropertyT>();
57
26.4k
        }
58
59
752
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
752
        auto pr = parse<typename PropertyT::ValueT>(value);
65
752
        if (pr.isValid()) {
66
304
            PropertyT result(*pr);
67
304
            return ParseResult<PropertyT>(&result);
68
304
        }
69
70
448
        return ParseResult<PropertyT>();
71
752
    }
SkTLazy<SkSVGProperty<float, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<float, true> >(char const*, char const*, char const*)
Line
Count
Source
54
39.5k
                                                const char* value) {
55
39.5k
        if (strcmp(name, expectedName) != 0) {
56
39.5k
            return ParseResult<PropertyT>();
57
39.5k
        }
58
59
3
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
3
        auto pr = parse<typename PropertyT::ValueT>(value);
65
3
        if (pr.isValid()) {
66
3
            PropertyT result(*pr);
67
3
            return ParseResult<PropertyT>(&result);
68
3
        }
69
70
0
        return ParseResult<PropertyT>();
71
3
    }
SkTLazy<SkSVGProperty<SkSVGColor, false> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGColor, false> >(char const*, char const*, char const*)
Line
Count
Source
54
40.6k
                                                const char* value) {
55
40.6k
        if (strcmp(name, expectedName) != 0) {
56
40.4k
            return ParseResult<PropertyT>();
57
40.4k
        }
58
59
149
        if (!strcmp(value, "inherit")) {
60
81
            PropertyT result(SkSVGPropertyState::kInherit);
61
81
            return ParseResult<PropertyT>(&result);
62
81
        }
63
64
68
        auto pr = parse<typename PropertyT::ValueT>(value);
65
68
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
68
        return ParseResult<PropertyT>();
71
68
    }
SkTLazy<SkSVGProperty<float, false> > SkSVGAttributeParser::parseProperty<SkSVGProperty<float, false> >(char const*, char const*, char const*)
Line
Count
Source
54
40.5k
                                                const char* value) {
55
40.5k
        if (strcmp(name, expectedName) != 0) {
56
40.3k
            return ParseResult<PropertyT>();
57
40.3k
        }
58
59
217
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
217
        auto pr = parse<typename PropertyT::ValueT>(value);
65
217
        if (pr.isValid()) {
66
216
            PropertyT result(*pr);
67
216
            return ParseResult<PropertyT>(&result);
68
216
        }
69
70
1
        return ParseResult<PropertyT>();
71
217
    }
SkTLazy<SkSVGProperty<SkSVGFontFamily, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGFontFamily, true> >(char const*, char const*, char const*)
Line
Count
Source
54
13.5k
                                                const char* value) {
55
13.5k
        if (strcmp(name, expectedName) != 0) {
56
13.5k
            return ParseResult<PropertyT>();
57
13.5k
        }
58
59
6
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
6
        auto pr = parse<typename PropertyT::ValueT>(value);
65
6
        if (pr.isValid()) {
66
6
            PropertyT result(*pr);
67
6
            return ParseResult<PropertyT>(&result);
68
6
        }
69
70
0
        return ParseResult<PropertyT>();
71
6
    }
SkTLazy<SkSVGProperty<SkSVGFontSize, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGFontSize, true> >(char const*, char const*, char const*)
Line
Count
Source
54
13.5k
                                                const char* value) {
55
13.5k
        if (strcmp(name, expectedName) != 0) {
56
13.5k
            return ParseResult<PropertyT>();
57
13.5k
        }
58
59
0
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
0
        auto pr = parse<typename PropertyT::ValueT>(value);
65
0
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
0
        return ParseResult<PropertyT>();
71
0
    }
SkTLazy<SkSVGProperty<SkSVGFontStyle, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGFontStyle, true> >(char const*, char const*, char const*)
Line
Count
Source
54
13.5k
                                                const char* value) {
55
13.5k
        if (strcmp(name, expectedName) != 0) {
56
13.5k
            return ParseResult<PropertyT>();
57
13.5k
        }
58
59
0
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
0
        auto pr = parse<typename PropertyT::ValueT>(value);
65
0
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
0
        return ParseResult<PropertyT>();
71
0
    }
SkTLazy<SkSVGProperty<SkSVGFontWeight, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGFontWeight, true> >(char const*, char const*, char const*)
Line
Count
Source
54
13.5k
                                                const char* value) {
55
13.5k
        if (strcmp(name, expectedName) != 0) {
56
13.5k
            return ParseResult<PropertyT>();
57
13.5k
        }
58
59
4
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
4
        auto pr = parse<typename PropertyT::ValueT>(value);
65
4
        if (pr.isValid()) {
66
4
            PropertyT result(*pr);
67
4
            return ParseResult<PropertyT>(&result);
68
4
        }
69
70
0
        return ParseResult<PropertyT>();
71
4
    }
SkTLazy<SkSVGProperty<SkSVGDashArray, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGDashArray, true> >(char const*, char const*, char const*)
Line
Count
Source
54
13.2k
                                                const char* value) {
55
13.2k
        if (strcmp(name, expectedName) != 0) {
56
12.9k
            return ParseResult<PropertyT>();
57
12.9k
        }
58
59
333
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
333
        auto pr = parse<typename PropertyT::ValueT>(value);
65
333
        if (pr.isValid()) {
66
322
            PropertyT result(*pr);
67
322
            return ParseResult<PropertyT>(&result);
68
322
        }
69
70
11
        return ParseResult<PropertyT>();
71
333
    }
SkTLazy<SkSVGProperty<SkSVGLength, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGLength, true> >(char const*, char const*, char const*)
Line
Count
Source
54
25.9k
                                                const char* value) {
55
25.9k
        if (strcmp(name, expectedName) != 0) {
56
25.8k
            return ParseResult<PropertyT>();
57
25.8k
        }
58
59
70
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
70
        auto pr = parse<typename PropertyT::ValueT>(value);
65
70
        if (pr.isValid()) {
66
61
            PropertyT result(*pr);
67
61
            return ParseResult<PropertyT>(&result);
68
61
        }
69
70
9
        return ParseResult<PropertyT>();
71
70
    }
SkTLazy<SkSVGProperty<SkSVGLineCap, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGLineCap, true> >(char const*, char const*, char const*)
Line
Count
Source
54
12.9k
                                                const char* value) {
55
12.9k
        if (strcmp(name, expectedName) != 0) {
56
12.9k
            return ParseResult<PropertyT>();
57
12.9k
        }
58
59
4
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
4
        auto pr = parse<typename PropertyT::ValueT>(value);
65
4
        if (pr.isValid()) {
66
1
            PropertyT result(*pr);
67
1
            return ParseResult<PropertyT>(&result);
68
1
        }
69
70
3
        return ParseResult<PropertyT>();
71
4
    }
SkTLazy<SkSVGProperty<SkSVGLineJoin, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGLineJoin, true> >(char const*, char const*, char const*)
Line
Count
Source
54
12.9k
                                                const char* value) {
55
12.9k
        if (strcmp(name, expectedName) != 0) {
56
12.8k
            return ParseResult<PropertyT>();
57
12.8k
        }
58
59
131
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
131
        auto pr = parse<typename PropertyT::ValueT>(value);
65
131
        if (pr.isValid()) {
66
6
            PropertyT result(*pr);
67
6
            return ParseResult<PropertyT>(&result);
68
6
        }
69
70
125
        return ParseResult<PropertyT>();
71
131
    }
SkTLazy<SkSVGProperty<SkSVGTextAnchor, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGTextAnchor, true> >(char const*, char const*, char const*)
Line
Count
Source
54
12.8k
                                                const char* value) {
55
12.8k
        if (strcmp(name, expectedName) != 0) {
56
12.8k
            return ParseResult<PropertyT>();
57
12.8k
        }
58
59
0
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
0
        auto pr = parse<typename PropertyT::ValueT>(value);
65
0
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
0
        return ParseResult<PropertyT>();
71
0
    }
SkTLazy<SkSVGProperty<SkSVGVisibility, true> > SkSVGAttributeParser::parseProperty<SkSVGProperty<SkSVGVisibility, true> >(char const*, char const*, char const*)
Line
Count
Source
54
12.8k
                                                const char* value) {
55
12.8k
        if (strcmp(name, expectedName) != 0) {
56
12.8k
            return ParseResult<PropertyT>();
57
12.8k
        }
58
59
0
        if (!strcmp(value, "inherit")) {
60
0
            PropertyT result(SkSVGPropertyState::kInherit);
61
0
            return ParseResult<PropertyT>(&result);
62
0
        }
63
64
0
        auto pr = parse<typename PropertyT::ValueT>(value);
65
0
        if (pr.isValid()) {
66
0
            PropertyT result(*pr);
67
0
            return ParseResult<PropertyT>(&result);
68
0
        }
69
70
0
        return ParseResult<PropertyT>();
71
0
    }
72
73
private:
74
    class RestoreCurPos {
75
    public:
76
        explicit RestoreCurPos(SkSVGAttributeParser* self)
77
8.48k
            : fSelf(self), fCurPos(self->fCurPos) {}
78
79
8.48k
        ~RestoreCurPos() {
80
8.48k
            if (fSelf) {
81
7.64k
                fSelf->fCurPos = this->fCurPos;
82
7.64k
            }
83
8.48k
        }
84
85
844
        void clear() { fSelf = nullptr; }
86
    private:
87
        SkSVGAttributeParser* fSelf;
88
        const char* fCurPos;
89
90
        RestoreCurPos(           const RestoreCurPos&) = delete;
91
        RestoreCurPos& operator=(const RestoreCurPos&) = delete;
92
    };
93
94
    // Stack-only
95
    void* operator new(size_t) = delete;
96
    void* operator new(size_t, void*) = delete;
97
98
    template <typename T>
99
    bool parse(T*);
100
101
    template <typename F>
102
    bool advanceWhile(F func);
103
104
    bool matchStringToken(const char* token, const char** newPos = nullptr) const;
105
    bool matchHexToken(const char** newPos) const;
106
107
    bool parseWSToken();
108
    bool parseEOSToken();
109
    bool parseSepToken();
110
    bool parseCommaWspToken();
111
    bool parseExpectedStringToken(const char*);
112
    bool parseScalarToken(SkScalar*);
113
    bool parseInt32Token(int32_t*);
114
    bool parseEscape(SkUnichar*);
115
    bool parseIdentToken(SkString*);
116
    bool parseLengthUnitToken(SkSVGLength::Unit*);
117
    bool parseNamedColorToken(SkColor*);
118
    bool parseHexColorToken(SkColor*);
119
    bool parseColorComponentScalarToken(int32_t*);
120
    bool parseColorComponentIntegralToken(int32_t*);
121
    bool parseColorComponentFractionalToken(int32_t*);
122
    bool parseColorComponentToken(int32_t*);
123
    bool parseColorToken(SkColor*);
124
    bool parseRGBColorToken(SkColor*);
125
    bool parseRGBAColorToken(SkColor*);
126
    bool parseSVGColor(SkSVGColor*, SkSVGColor::Vars&&);
127
    bool parseSVGColorType(SkSVGColorType*);
128
    bool parseFuncIRI(SkSVGFuncIRI*);
129
130
    // Transform helpers
131
    bool parseMatrixToken(SkMatrix*);
132
    bool parseTranslateToken(SkMatrix*);
133
    bool parseScaleToken(SkMatrix*);
134
    bool parseRotateToken(SkMatrix*);
135
    bool parseSkewXToken(SkMatrix*);
136
    bool parseSkewYToken(SkMatrix*);
137
138
    // Parses a sequence of 'WS* <prefix> WS* (<nested>)', where the nested sequence
139
    // is handled by the passed functor.
140
    template <typename Func, typename T>
141
    bool parseParenthesized(const char* prefix, Func, T* result);
142
143
    template <typename T>
144
    bool parseList(std::vector<T>*);
145
146
    template <typename T, typename TArray>
147
8
    bool parseEnumMap(const TArray& arr, T* result) {
148
45
        for (size_t i = 0; i < std::size(arr); ++i) {
149
43
            if (this->parseExpectedStringToken(std::get<0>(arr[i]))) {
150
6
                *result = std::get<1>(arr[i]);
151
6
                return true;
152
6
            }
153
43
        }
154
2
        return false;
155
8
    }
bool SkSVGAttributeParser::parseEnumMap<SkSVGFeInputType::Type, std::__1::tuple<char const*, SkSVGFeInputType::Type> [6]>(std::__1::tuple<char const*, SkSVGFeInputType::Type> const (&) [6], SkSVGFeInputType::Type*)
Line
Count
Source
147
4
    bool parseEnumMap(const TArray& arr, T* result) {
148
17
        for (size_t i = 0; i < std::size(arr); ++i) {
149
15
            if (this->parseExpectedStringToken(std::get<0>(arr[i]))) {
150
2
                *result = std::get<1>(arr[i]);
151
2
                return true;
152
2
            }
153
15
        }
154
2
        return false;
155
4
    }
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGFeBlend::Mode, std::__1::tuple<char const*, SkSVGFeBlend::Mode> [5]>(std::__1::tuple<char const*, SkSVGFeBlend::Mode> const (&) [5], SkSVGFeBlend::Mode*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGFeColorMatrixType, std::__1::tuple<char const*, SkSVGFeColorMatrixType> [4]>(std::__1::tuple<char const*, SkSVGFeColorMatrixType> const (&) [4], SkSVGFeColorMatrixType*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGFeFuncType, std::__1::tuple<char const*, SkSVGFeFuncType> [5]>(std::__1::tuple<char const*, SkSVGFeFuncType> const (&) [5], SkSVGFeFuncType*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGFeCompositeOperator, std::__1::tuple<char const*, SkSVGFeCompositeOperator> [6]>(std::__1::tuple<char const*, SkSVGFeCompositeOperator> const (&) [6], SkSVGFeCompositeOperator*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkColorChannel, std::__1::tuple<char const*, SkColorChannel> [4]>(std::__1::tuple<char const*, SkColorChannel> const (&) [4], SkColorChannel*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGFeMorphology::Operator, std::__1::tuple<char const*, SkSVGFeMorphology::Operator> [2]>(std::__1::tuple<char const*, SkSVGFeMorphology::Operator> const (&) [2], SkSVGFeMorphology::Operator*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGXmlSpace, std::__1::tuple<char const*, SkSVGXmlSpace> [2]>(std::__1::tuple<char const*, SkSVGXmlSpace> const (&) [2], SkSVGXmlSpace*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGFontStyle::Type, std::__1::tuple<char const*, SkSVGFontStyle::Type> [4]>(std::__1::tuple<char const*, SkSVGFontStyle::Type> const (&) [4], SkSVGFontStyle::Type*)
bool SkSVGAttributeParser::parseEnumMap<SkSVGFontWeight::Type, std::__1::tuple<char const*, SkSVGFontWeight::Type> [14]>(std::__1::tuple<char const*, SkSVGFontWeight::Type> const (&) [14], SkSVGFontWeight::Type*)
Line
Count
Source
147
4
    bool parseEnumMap(const TArray& arr, T* result) {
148
28
        for (size_t i = 0; i < std::size(arr); ++i) {
149
28
            if (this->parseExpectedStringToken(std::get<0>(arr[i]))) {
150
4
                *result = std::get<1>(arr[i]);
151
4
                return true;
152
4
            }
153
28
        }
154
0
        return false;
155
4
    }
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGTextAnchor::Type, std::__1::tuple<char const*, SkSVGTextAnchor::Type> [4]>(std::__1::tuple<char const*, SkSVGTextAnchor::Type> const (&) [4], SkSVGTextAnchor::Type*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGPreserveAspectRatio::Align, std::__1::tuple<char const*, SkSVGPreserveAspectRatio::Align> [10]>(std::__1::tuple<char const*, SkSVGPreserveAspectRatio::Align> const (&) [10], SkSVGPreserveAspectRatio::Align*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGPreserveAspectRatio::Scale, std::__1::tuple<char const*, SkSVGPreserveAspectRatio::Scale> [2]>(std::__1::tuple<char const*, SkSVGPreserveAspectRatio::Scale> const (&) [2], SkSVGPreserveAspectRatio::Scale*)
Unexecuted instantiation: bool SkSVGAttributeParser::parseEnumMap<SkSVGColorspace, std::__1::tuple<char const*, SkSVGColorspace> [3]>(std::__1::tuple<char const*, SkSVGColorspace> const (&) [3], SkSVGColorspace*)
156
157
    // The current position in the input string.
158
    const char* fCurPos;
159
    const char* fEndPos;
160
161
    using INHERITED = SkNoncopyable;
162
};
163
164
#endif // SkSVGAttributeParser_DEFINED