Go to the source code of this file.
◆ DEF_TEST() [1/4]
Definition at line 330 of file PathMeasureTest.cpp.
330 {
332 path.addCircle(0, 0, 100);
333 path.addCircle(0, 0, 10);
334
337
338 auto cm0 = fact.next();
339 auto cm1 = fact.next();
340
343
345
348
350
351 auto cm2 = fact.next();
353
356
358}
static void test_empty_contours(skiatest::Reporter *reporter)
static void test_shrink(skiatest::Reporter *reporter)
static void test_90_degrees(const sk_sp< SkContourMeasure > &cm, SkScalar radius, skiatest::Reporter *reporter)
static void test_MLM_contours(skiatest::Reporter *reporter)
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
#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
◆ DEF_TEST() [2/4]
Definition at line 104 of file PathMeasureTest.cpp.
104 {
106
111
115
119 meas.setPath(&
path,
false);
120 length = meas.getLength();
122
125 meas.setPath(&
path,
true);
126 length = meas.getLength();
127
128
129
136 meas.setPath(&
path,
false);
137 length = meas.getLength();
139 meas.nextContour();
140 length = meas.getLength();
148 0.0001f));
152
153
166 meas.setPath(&
path,
false);
167 length = meas.getLength();
173 0.0001f));
187 2.5f,
188 0.0001f));
191 2.0f,
192 0.0001f));
195
202 meas.setPath(&
path,
false);
203 length = meas.getLength();
209 0.0001f));
213 meas.nextContour();
214 length = meas.getLength();
219 1.5f,
220 0.0001f));
223 2.0f,
224 0.0001f));
227
231
232
234 meas = std::move(meas2);
235}
static void test_small_segment3(skiatest::Reporter *reporter)
static void test_small_segment2()
static void test_small_segment()
◆ DEF_TEST() [3/4]
DEF_TEST |
( |
PathMeasure_nextctr |
, |
|
|
reporter |
|
|
) |
| |
◆ DEF_TEST() [4/4]
DEF_TEST |
( |
PathMeasureConic |
, |
|
|
reporter |
|
|
) |
| |
Definition at line 237 of file PathMeasureTest.cpp.
237 {
238 SkPoint stdP, hiP, pts[] = {{0,0}, {100,0}, {100,0}};
241 p.conicTo(pts[1], pts[2], 1);
246 p.conicTo(pts[1], pts[2], 10);
247 stdm.setPath(&
p,
false);
251}
◆ test_90_degrees()
Definition at line 263 of file PathMeasureTest.cpp.
264 {
269
275}
bool getPosTan(SkScalar distance, SkPoint *position, SkVector *tangent) const
◆ test_empty_contours()
Definition at line 277 of file PathMeasureTest.cpp.
277 {
279
280 path.moveTo(0, 0).lineTo(100, 100).lineTo(200, 100);
281 path.moveTo(2, 2).moveTo(3, 3);
282 path.moveTo(4, 4).close().close().close();
283 path.moveTo(5, 5).lineTo(5, 5);
284 path.moveTo(5, 5).lineTo(5, 5).close();
285 path.moveTo(5, 5).lineTo(5, 5).close().close();
286 path.moveTo(6, 6).lineTo(7, 7);
288
290
291
292
296}
◆ test_MLM_contours()
Definition at line 298 of file PathMeasureTest.cpp.
298 {
300
301
302
303 path.moveTo(10, 10).lineTo(20, 20).moveTo(30, 30);
304
305 for (bool forceClosed : {false, true}) {
309 }
310}
◆ test_shrink()
Definition at line 312 of file PathMeasureTest.cpp.
312 {
314 path.addRect({1, 2, 3, 4});
315 path.incReserve(100);
316
318
319
320
321
323
324
325
326 while (iter.next())
327 ;
328}
static void ShrinkToFit(SkPath *path)
◆ test_small_segment()
static void test_small_segment |
( |
| ) |
|
|
static |
Definition at line 72 of file PathMeasureTest.cpp.
72 {
75 { 100000, 100000},
76
77 { 1.0005f, 0.9999f },
78
80 };
81
85 }
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101 meas.getLength();
102}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ test_small_segment2()
static void test_small_segment2 |
( |
| ) |
|
|
static |
Definition at line 56 of file PathMeasureTest.cpp.
56 {
59 { 0, 0 },
60 { 100000000000.0f, 100000000000.0f }, { 0, 0 },
61 { 10, 10 }, { 0, 0 },
62 };
63
66 path.quadTo(pts[
i], pts[
i + 1]);
67 }
69 meas.getLength();
70}
◆ test_small_segment3()
Definition at line 24 of file PathMeasureTest.cpp.
24 {
27 { 0, 0 },
28 { 100000000000.0f, 100000000000.0f }, { 0, 0 }, { 10, 10 },
29 { 10, 10 }, { 0, 0 }, { 10, 10 }
30 };
31
34 path.cubicTo(pts[
i], pts[
i + 1], pts[
i + 2]);
35 }
36
38 meas.getLength();
39
40
41
42
43
44
45
46 {
49
50 constexpr float resScale = 1000;
53 }
54}
static size_t CountSegments(const SkPathMeasure &)