17 {
18 enum class Verb {
25 kImplicitMove
26 };
27
28 Verb verbs[] = {
29 Verb::kImplicitMove,
30 Verb::kLine,
31 Verb::kConic,
32 Verb::kClose,
33 Verb::kImplicitMove,
34 Verb::kCubic,
36 Verb::kConic,
37 Verb::kLine,
38 Verb::kClose,
41 };
42
44 public:
47 } genData, testData;
48
49 for (
int i = 0;
i < 10; ++
i) {
50 if (genData.p() != testData.p() || genData.w() != testData.w()) {
51 ERRORF(r,
"genData and testData not in sync.");
52 return;
53 }
54 }
55
56
58 for (Verb verb : verbs) {
59 switch (verb) {
60 case Verb::kImplicitMove:
61 break;
63 path.moveTo(genData.p());
64 break;
65 case Verb::kLine:
66 path.lineTo(genData.p());
67 break;
72 break;
73 }
74 case Verb::kCubic: {
77 auto c = genData.p();
79 break;
80 }
81 case Verb::kConic: {
84 path.conicTo(
a,
b, genData.w());
85 break;
86 }
87 case Verb::kClose:
89 break;
90 }
91 }
92
93
95 auto iter = iterate.begin();
98 for (Verb verb : verbs) {
99 auto [pathVerb, pathPts, pathWt] = *iter++;
100 switch (verb) {
101 case Verb::kImplicitMove:
103 lastPt = pathPts[0];
104 break;
107 startPt = lastPt = pathPts[0];
108 break;
109 case Verb::kLine:
112 lastPt = pathPts[1];
113 break;
118 lastPt = pathPts[2];
119 break;
120 case Verb::kCubic:
125 lastPt = pathPts[3];
126 break;
127 case Verb::kConic:
132 lastPt = pathPts[2];
133 break;
134 case Verb::kClose:
136 break;
137 }
138 }
140}
@ kClose
SkPath::RawIter returns 0 points.
@ kCubic
SkPath::RawIter returns 4 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kQuad
SkPath::RawIter returns 3 points.
@ kMove
SkPath::RawIter returns 1 point.
@ kLine
SkPath::RawIter returns 2 points.
#define REPORTER_ASSERT(r, cond,...)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path