blob: fff52ca3c87fd0f5434fb0ed0ccf73d51392b12e [file] [log] [blame]
caryclark@google.com818b0cc2013-04-08 11:50:46 +00001/*
2 * Copyright 2012 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#include "PathOpsExtendedTest.h"
tfarina@chromium.org78e7b4e2014-01-02 21:45:03 +00008#include "TestClassDef.h"
caryclark@google.com818b0cc2013-04-08 11:50:46 +00009
10#define TEST(name) { name, #name }
11
12static void testLine1(skiatest::Reporter* reporter) {
13 SkPath path;
14 path.moveTo(2,0);
15 path.lineTo(1,1);
16 path.lineTo(0,0);
17 path.close();
18 testSimplify(reporter, path);
19}
20
21static void testLine1x(skiatest::Reporter* reporter) {
22 SkPath path;
23 path.setFillType(SkPath::kEvenOdd_FillType);
24 path.moveTo(2,0);
25 path.lineTo(1,1);
26 path.lineTo(0,0);
27 path.close();
28 testSimplify(reporter, path);
29}
30
31static void addInnerCWTriangle(SkPath& path) {
32 path.moveTo(3,0);
33 path.lineTo(4,1);
34 path.lineTo(2,1);
35 path.close();
36}
37
38static void addInnerCCWTriangle(SkPath& path) {
39 path.moveTo(3,0);
40 path.lineTo(2,1);
41 path.lineTo(4,1);
42 path.close();
43}
44
45static void addOuterCWTriangle(SkPath& path) {
46 path.moveTo(3,0);
47 path.lineTo(6,2);
48 path.lineTo(0,2);
49 path.close();
50}
51
52static void addOuterCCWTriangle(SkPath& path) {
53 path.moveTo(3,0);
54 path.lineTo(0,2);
55 path.lineTo(6,2);
56 path.close();
57}
58
59static void testLine2(skiatest::Reporter* reporter) {
60 SkPath path;
61 path.setFillType(SkPath::kEvenOdd_FillType);
62 addInnerCWTriangle(path);
63 addOuterCWTriangle(path);
64 testSimplify(reporter, path);
65}
66
67static void testLine2x(skiatest::Reporter* reporter) {
68 SkPath path;
69 path.setFillType(SkPath::kEvenOdd_FillType);
70 addInnerCWTriangle(path);
71 addOuterCWTriangle(path);
72 testSimplify(reporter, path);
73}
74
75static void testLine3(skiatest::Reporter* reporter) {
76 SkPath path;
77 path.setFillType(SkPath::kEvenOdd_FillType);
78 addInnerCCWTriangle(path);
79 addOuterCWTriangle(path);
80 testSimplify(reporter, path);
81}
82
83static void testLine3x(skiatest::Reporter* reporter) {
84 SkPath path;
85 path.setFillType(SkPath::kEvenOdd_FillType);
86 addInnerCCWTriangle(path);
87 addOuterCWTriangle(path);
88 testSimplify(reporter, path);
89}
90
91static void testLine3a(skiatest::Reporter* reporter) {
92 SkPath path;
93 addInnerCWTriangle(path);
94 addOuterCCWTriangle(path);
95 testSimplify(reporter, path);
96}
97
98static void testLine3ax(skiatest::Reporter* reporter) {
99 SkPath path;
100 path.setFillType(SkPath::kEvenOdd_FillType);
101 addInnerCWTriangle(path);
102 addOuterCCWTriangle(path);
103 testSimplify(reporter, path);
104}
105
106static void testLine3b(skiatest::Reporter* reporter) {
107 SkPath path;
108 addInnerCCWTriangle(path);
109 addOuterCCWTriangle(path);
110 testSimplify(reporter, path);
111}
112
113static void testLine3bx(skiatest::Reporter* reporter) {
114 SkPath path;
115 path.setFillType(SkPath::kEvenOdd_FillType);
116 addInnerCCWTriangle(path);
117 addOuterCCWTriangle(path);
118 testSimplify(reporter, path);
119}
120
121static void testLine4(skiatest::Reporter* reporter) {
122 SkPath path;
123 addOuterCCWTriangle(path);
124 addOuterCWTriangle(path);
125 testSimplify(reporter, path);
126}
127
128static void testLine4x(skiatest::Reporter* reporter) {
129 SkPath path;
130 path.setFillType(SkPath::kEvenOdd_FillType);
131 addOuterCCWTriangle(path);
132 addOuterCWTriangle(path);
133 testSimplify(reporter, path);
134}
135
136static void testLine5(skiatest::Reporter* reporter) {
137 SkPath path;
138 addOuterCWTriangle(path);
139 addOuterCWTriangle(path);
140 testSimplify(reporter, path);
141}
142
143static void testLine5x(skiatest::Reporter* reporter) {
144 SkPath path;
145 path.setFillType(SkPath::kEvenOdd_FillType);
146 addOuterCWTriangle(path);
147 addOuterCWTriangle(path);
148 testSimplify(reporter, path);
149}
150
151static void testLine6(skiatest::Reporter* reporter) {
152 SkPath path;
153 path.moveTo(0,0);
154 path.lineTo(4,0);
155 path.lineTo(2,2);
156 path.close();
157 path.moveTo(2,0);
158 path.lineTo(6,0);
159 path.lineTo(4,2);
160 path.close();
161 testSimplify(reporter, path);
162}
163
164static void testLine6x(skiatest::Reporter* reporter) {
165 SkPath path;
166 path.setFillType(SkPath::kEvenOdd_FillType);
167 path.moveTo(0,0);
168 path.lineTo(4,0);
169 path.lineTo(2,2);
170 path.close();
171 path.moveTo(2,0);
172 path.lineTo(6,0);
173 path.lineTo(4,2);
174 path.close();
175 testSimplify(reporter, path);
176}
177
178static void testLine7(skiatest::Reporter* reporter) {
179 SkPath path;
180 path.moveTo(0,0);
181 path.lineTo(4,0);
182 path.lineTo(2,2);
183 path.close();
184 path.moveTo(6,0);
185 path.lineTo(2,0);
186 path.lineTo(4,2);
187 path.close();
188 testSimplify(reporter, path);
189}
190
191static void testLine7x(skiatest::Reporter* reporter) {
192 SkPath path;
193 path.setFillType(SkPath::kEvenOdd_FillType);
194 path.moveTo(0,0);
195 path.lineTo(4,0);
196 path.lineTo(2,2);
197 path.close();
198 path.moveTo(6,0);
199 path.lineTo(2,0);
200 path.lineTo(4,2);
201 path.close();
202 testSimplify(reporter, path);
203}
204
205static void testLine7a(skiatest::Reporter* reporter) {
206 SkPath path;
207 path.moveTo(0,0);
208 path.lineTo(4,0);
209 path.lineTo(2,2);
210 path.close();
211 testSimplify(reporter, path);
212}
213
214static void testLine7ax(skiatest::Reporter* reporter) {
215 SkPath path;
216 path.setFillType(SkPath::kEvenOdd_FillType);
217 path.moveTo(0,0);
218 path.lineTo(4,0);
219 path.lineTo(2,2);
220 path.close();
221 testSimplify(reporter, path);
222}
223
224static void testLine7b(skiatest::Reporter* reporter) {
225 SkPath path;
226 path.moveTo(0,0);
227 path.lineTo(4,0);
228 path.close();
229 path.moveTo(6,0);
230 path.lineTo(2,0);
231 path.lineTo(4,2);
232 path.close();
233 testSimplify(reporter, path);
234}
235
236static void testLine7bx(skiatest::Reporter* reporter) {
237 SkPath path;
238 path.setFillType(SkPath::kEvenOdd_FillType);
239 path.moveTo(0,0);
240 path.lineTo(4,0);
241 path.close();
242 path.moveTo(6,0);
243 path.lineTo(2,0);
244 path.lineTo(4,2);
245 path.close();
246 testSimplify(reporter, path);
247}
248
249static void testLine8(skiatest::Reporter* reporter) {
250 SkPath path;
251 path.moveTo(0,4);
252 path.lineTo(4,4);
253 path.lineTo(2,2);
254 path.close();
255 path.moveTo(2,4);
256 path.lineTo(6,4);
257 path.lineTo(4,2);
258 path.close();
259 testSimplify(reporter, path);
260}
261
262static void testLine8x(skiatest::Reporter* reporter) {
263 SkPath path;
264 path.setFillType(SkPath::kEvenOdd_FillType);
265 path.moveTo(0,4);
266 path.lineTo(4,4);
267 path.lineTo(2,2);
268 path.close();
269 path.moveTo(2,4);
270 path.lineTo(6,4);
271 path.lineTo(4,2);
272 path.close();
273 testSimplify(reporter, path);
274}
275
276static void testLine9(skiatest::Reporter* reporter) {
277 SkPath path;
278 path.moveTo(0,4);
279 path.lineTo(4,4);
280 path.lineTo(2,2);
281 path.close();
282 path.moveTo(6,4);
283 path.lineTo(2,4);
284 path.lineTo(4,2);
285 path.close();
286 testSimplify(reporter, path);
287}
288
289static void testLine9x(skiatest::Reporter* reporter) {
290 SkPath path;
291 path.setFillType(SkPath::kEvenOdd_FillType);
292 path.moveTo(0,4);
293 path.lineTo(4,4);
294 path.lineTo(2,2);
295 path.close();
296 path.moveTo(6,4);
297 path.lineTo(2,4);
298 path.lineTo(4,2);
299 path.close();
300 testSimplify(reporter, path);
301}
302
303static void testLine10(skiatest::Reporter* reporter) {
304 SkPath path;
305 path.moveTo(0,4);
306 path.lineTo(4,4);
307 path.lineTo(2,2);
308 path.close();
309 path.moveTo(2,1);
310 path.lineTo(3,4);
311 path.lineTo(6,1);
312 path.close();
313 testSimplify(reporter, path);
314}
315
316static void testLine10x(skiatest::Reporter* reporter) {
317 SkPath path;
318 path.setFillType(SkPath::kEvenOdd_FillType);
319 path.moveTo(0,4);
320 path.lineTo(4,4);
321 path.lineTo(2,2);
322 path.close();
323 path.moveTo(2,1);
324 path.lineTo(3,4);
325 path.lineTo(6,1);
326 path.close();
327 testSimplify(reporter, path);
328}
329
330static void testLine10a(skiatest::Reporter* reporter) {
331 SkPath path;
332 path.moveTo(0,4);
333 path.lineTo(8,4);
334 path.lineTo(4,0);
335 path.close();
336 path.moveTo(2,2);
337 path.lineTo(3,3);
338 path.lineTo(4,2);
339 path.close();
340 testSimplify(reporter, path);
341}
342
343static void testLine10ax(skiatest::Reporter* reporter) {
344 SkPath path;
345 path.setFillType(SkPath::kEvenOdd_FillType);
346 path.moveTo(0,4);
347 path.lineTo(8,4);
348 path.lineTo(4,0);
349 path.close();
350 path.moveTo(2,2);
351 path.lineTo(3,3);
352 path.lineTo(4,2);
353 path.close();
354 testSimplify(reporter, path);
355}
356
357static void addCWContainer(SkPath& path) {
358 path.moveTo(6,4);
359 path.lineTo(0,4);
360 path.lineTo(3,1);
361 path.close();
362}
363
364static void addCCWContainer(SkPath& path) {
365 path.moveTo(0,4);
366 path.lineTo(6,4);
367 path.lineTo(3,1);
368 path.close();
369}
370
371static void addCWContents(SkPath& path) {
372 path.moveTo(2,3);
373 path.lineTo(3,2);
374 path.lineTo(4,3);
375 path.close();
376}
377
378static void addCCWContents(SkPath& path) {
379 path.moveTo(3,2);
380 path.lineTo(2,3);
381 path.lineTo(4,3);
382 path.close();
383}
384
385static void testLine11(skiatest::Reporter* reporter) {
386 SkPath path;
387 addCWContainer(path);
388 addCWContents(path);
389 testSimplify(reporter, path);
390}
391
392static void testLine11x(skiatest::Reporter* reporter) {
393 SkPath path;
394 path.setFillType(SkPath::kEvenOdd_FillType);
395 addCWContainer(path);
396 addCWContents(path);
397 testSimplify(reporter, path);
398}
399
400static void testLine12(skiatest::Reporter* reporter) {
401 SkPath path;
402 addCCWContainer(path);
403 addCWContents(path);
404 testSimplify(reporter, path);
405}
406
407static void testLine12x(skiatest::Reporter* reporter) {
408 SkPath path;
409 path.setFillType(SkPath::kEvenOdd_FillType);
410 addCCWContainer(path);
411 addCWContents(path);
412 testSimplify(reporter, path);
413}
414
415static void testLine13(skiatest::Reporter* reporter) {
416 SkPath path;
417 addCWContainer(path);
418 addCCWContents(path);
419 testSimplify(reporter, path);
420}
421
422static void testLine13x(skiatest::Reporter* reporter) {
423 SkPath path;
424 path.setFillType(SkPath::kEvenOdd_FillType);
425 addCWContainer(path);
426 addCCWContents(path);
427 testSimplify(reporter, path);
428}
429
430static void testLine14(skiatest::Reporter* reporter) {
431 SkPath path;
432 addCCWContainer(path);
433 addCCWContents(path);
434 testSimplify(reporter, path);
435}
436
437static void testLine14x(skiatest::Reporter* reporter) {
438 SkPath path;
439 path.setFillType(SkPath::kEvenOdd_FillType);
440 addCCWContainer(path);
441 addCCWContents(path);
442 testSimplify(reporter, path);
443}
444
445static void testLine15(skiatest::Reporter* reporter) {
446 SkPath path;
447 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
448 testSimplify(reporter, path);
449}
450
451static void testLine15x(skiatest::Reporter* reporter) {
452 SkPath path;
453 path.setFillType(SkPath::kEvenOdd_FillType);
454 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
455 testSimplify(reporter, path);
456}
457
458static void testLine16(skiatest::Reporter* reporter) {
459 SkPath path;
460 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
461 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
462 testSimplify(reporter, path);
463}
464
465static void testLine16x(skiatest::Reporter* reporter) {
466 SkPath path;
467 path.setFillType(SkPath::kEvenOdd_FillType);
468 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
469 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
470 testSimplify(reporter, path);
471}
472
473static void testLine17(skiatest::Reporter* reporter) {
474 SkPath path;
475 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
476 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
477 testSimplify(reporter, path);
478}
479
480static void testLine17x(skiatest::Reporter* reporter) {
481 SkPath path;
482 path.setFillType(SkPath::kEvenOdd_FillType);
483 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
484 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
485 testSimplify(reporter, path);
486}
487
488static void testLine18(skiatest::Reporter* reporter) {
489 SkPath path;
490 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
491 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
492 testSimplify(reporter, path);
493}
494
495static void testLine18x(skiatest::Reporter* reporter) {
496 SkPath path;
497 path.setFillType(SkPath::kEvenOdd_FillType);
498 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
499 path.addRect(12, 4, 21, 21, SkPath::kCW_Direction);
500 testSimplify(reporter, path);
501}
502
503static void testLine19(skiatest::Reporter* reporter) {
504 SkPath path;
505 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
506 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
507 testSimplify(reporter, path);
508}
509
510static void testLine19x(skiatest::Reporter* reporter) {
511 SkPath path;
512 path.setFillType(SkPath::kEvenOdd_FillType);
513 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
514 path.addRect(12, 16, 21, 21, SkPath::kCW_Direction);
515 testSimplify(reporter, path);
516}
517
518static void testLine20(skiatest::Reporter* reporter) {
519 SkPath path;
520 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
521 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
522 testSimplify(reporter, path);
523}
524
525static void testLine20x(skiatest::Reporter* reporter) {
526 SkPath path;
527 path.setFillType(SkPath::kEvenOdd_FillType);
528 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
529 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
530 testSimplify(reporter, path);
531}
532
533static void testLine21(skiatest::Reporter* reporter) {
534 SkPath path;
535 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
536 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
537 testSimplify(reporter, path);
538}
539
540static void testLine21x(skiatest::Reporter* reporter) {
541 SkPath path;
542 path.setFillType(SkPath::kEvenOdd_FillType);
543 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
544 path.addRect(0, 16, 9, 9, SkPath::kCW_Direction);
545 testSimplify(reporter, path);
546}
547
548static void testLine22(skiatest::Reporter* reporter) {
549 SkPath path;
550 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
551 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
552 testSimplify(reporter, path);
553}
554
555static void testLine22x(skiatest::Reporter* reporter) {
556 SkPath path;
557 path.setFillType(SkPath::kEvenOdd_FillType);
558 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
559 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
560 testSimplify(reporter, path);
561}
562
563static void testLine23(skiatest::Reporter* reporter) {
564 SkPath path;
565 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
566 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
567 testSimplify(reporter, path);
568}
569
570static void testLine23x(skiatest::Reporter* reporter) {
571 SkPath path;
572 path.setFillType(SkPath::kEvenOdd_FillType);
573 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
574 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
575 testSimplify(reporter, path);
576}
577
578static void testLine24a(skiatest::Reporter* reporter) {
579 SkPath path;
580 path.moveTo(2,0);
581 path.lineTo(4,4);
582 path.lineTo(0,4);
583 path.close();
584 path.moveTo(2,0);
585 path.lineTo(1,2);
586 path.lineTo(2,2);
587 path.close();
588 testSimplify(reporter, path);
589}
590
591static void testLine24ax(skiatest::Reporter* reporter) {
592 SkPath path;
593 path.setFillType(SkPath::kEvenOdd_FillType);
594 path.moveTo(2,0);
595 path.lineTo(4,4);
596 path.lineTo(0,4);
597 path.close();
598 path.moveTo(2,0);
599 path.lineTo(1,2);
600 path.lineTo(2,2);
601 path.close();
602 testSimplify(reporter, path);
603}
604
605static void testLine24(skiatest::Reporter* reporter) {
606 SkPath path;
607 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
608 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
609 testSimplify(reporter, path);
610}
611
612static void testLine24x(skiatest::Reporter* reporter) {
613 SkPath path;
614 path.setFillType(SkPath::kEvenOdd_FillType);
615 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
616 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
617 testSimplify(reporter, path);
618}
619
620static void testLine25(skiatest::Reporter* reporter) {
621 SkPath path;
622 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
623 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
624 testSimplify(reporter, path);
625}
626
627static void testLine25x(skiatest::Reporter* reporter) {
628 SkPath path;
629 path.setFillType(SkPath::kEvenOdd_FillType);
630 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
631 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
632 testSimplify(reporter, path);
633}
634
635static void testLine26(skiatest::Reporter* reporter) {
636 SkPath path;
637 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
638 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
639 testSimplify(reporter, path);
640}
641
642static void testLine26x(skiatest::Reporter* reporter) {
643 SkPath path;
644 path.setFillType(SkPath::kEvenOdd_FillType);
645 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
646 path.addRect(0, 12, 9, 9, SkPath::kCW_Direction);
647 testSimplify(reporter, path);
648}
649
650static void testLine27(skiatest::Reporter* reporter) {
651 SkPath path;
652 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
653 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
654 testSimplify(reporter, path);
655}
656
657static void testLine27x(skiatest::Reporter* reporter) {
658 SkPath path;
659 path.setFillType(SkPath::kEvenOdd_FillType);
660 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
661 path.addRect(12, 8, 21, 21, SkPath::kCW_Direction);
662 testSimplify(reporter, path);
663}
664
665static void testLine28(skiatest::Reporter* reporter) {
666 SkPath path;
667 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
668 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
669 testSimplify(reporter, path);
670}
671
672static void testLine28x(skiatest::Reporter* reporter) {
673 SkPath path;
674 path.setFillType(SkPath::kEvenOdd_FillType);
675 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
676 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
677 testSimplify(reporter, path);
678}
679
680static void testLine29(skiatest::Reporter* reporter) {
681 SkPath path;
682 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
683 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
684 testSimplify(reporter, path);
685}
686
687static void testLine29x(skiatest::Reporter* reporter) {
688 SkPath path;
689 path.setFillType(SkPath::kEvenOdd_FillType);
690 path.addRect(0, 18, 12, 12, SkPath::kCW_Direction);
691 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
692 testSimplify(reporter, path);
693}
694
695static void testLine30(skiatest::Reporter* reporter) {
696 SkPath path;
697 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
698 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
699 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
700 testSimplify(reporter, path);
701}
702
703static void testLine30x(skiatest::Reporter* reporter) {
704 SkPath path;
705 path.setFillType(SkPath::kEvenOdd_FillType);
706 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
707 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
708 path.addRect(4, 4, 13, 13, SkPath::kCW_Direction);
709 testSimplify(reporter, path);
710}
711
712static void testLine31(skiatest::Reporter* reporter) {
713 SkPath path;
714 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
715 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
716 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
717 testSimplify(reporter, path);
718}
719
720static void testLine31x(skiatest::Reporter* reporter) {
721 SkPath path;
722 path.setFillType(SkPath::kEvenOdd_FillType);
723 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
724 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
725 path.addRect(0, 4, 9, 9, SkPath::kCW_Direction);
726 testSimplify(reporter, path);
727}
728
729static void testLine32(skiatest::Reporter* reporter) {
730 SkPath path;
731 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
732 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
733 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
734 testSimplify(reporter, path);
735}
736
737static void testLine32x(skiatest::Reporter* reporter) {
738 SkPath path;
739 path.setFillType(SkPath::kEvenOdd_FillType);
740 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
741 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
742 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
743 testSimplify(reporter, path);
744}
745
746static void testLine33(skiatest::Reporter* reporter) {
747 SkPath path;
748 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
749 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
750 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
751 testSimplify(reporter, path);
752}
753
754static void testLine33x(skiatest::Reporter* reporter) {
755 SkPath path;
756 path.setFillType(SkPath::kEvenOdd_FillType);
757 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
758 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
759 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
760 testSimplify(reporter, path);
761}
762
763static void testLine34(skiatest::Reporter* reporter) {
764 SkPath path;
765 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
766 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
767 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
768 testSimplify(reporter, path);
769}
770
771static void testLine34x(skiatest::Reporter* reporter) {
772 SkPath path;
773 path.setFillType(SkPath::kEvenOdd_FillType);
774 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
775 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
776 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
777 testSimplify(reporter, path);
778}
779
780static void testLine35(skiatest::Reporter* reporter) {
781 SkPath path;
782 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
783 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
784 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
785 testSimplify(reporter, path);
786}
787
788static void testLine35x(skiatest::Reporter* reporter) {
789 SkPath path;
790 path.setFillType(SkPath::kEvenOdd_FillType);
791 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
792 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
793 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
794 testSimplify(reporter, path);
795}
796
797static void testLine36(skiatest::Reporter* reporter) {
798 SkPath path;
799 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
800 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
801 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
802 testSimplify(reporter, path);
803}
804
805static void testLine36x(skiatest::Reporter* reporter) {
806 SkPath path;
807 path.setFillType(SkPath::kEvenOdd_FillType);
808 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
809 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
810 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
811 testSimplify(reporter, path);
812}
813
814static void testLine37(skiatest::Reporter* reporter) {
815 SkPath path;
816 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
817 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
818 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
819 testSimplify(reporter, path);
820}
821
822static void testLine37x(skiatest::Reporter* reporter) {
823 SkPath path;
824 path.setFillType(SkPath::kEvenOdd_FillType);
825 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
826 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
827 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
828 testSimplify(reporter, path);
829}
830
831static void testLine38(skiatest::Reporter* reporter) {
832 SkPath path;
833 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
834 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
835 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
836 testSimplify(reporter, path);
837}
838
839static void testLine38x(skiatest::Reporter* reporter) {
840 SkPath path;
841 path.setFillType(SkPath::kEvenOdd_FillType);
842 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
843 path.addRect(6, 12, 18, 18, SkPath::kCW_Direction);
844 path.addRect(12, 12, 21, 21, SkPath::kCW_Direction);
845 testSimplify(reporter, path);
846}
847
848static void testLine40(skiatest::Reporter* reporter) {
849 SkPath path;
850 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
851 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
852 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
853 testSimplify(reporter, path);
854}
855
856static void testLine40x(skiatest::Reporter* reporter) {
857 SkPath path;
858 path.setFillType(SkPath::kEvenOdd_FillType);
859 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
860 path.addRect(12, 18, 24, 24, SkPath::kCW_Direction);
861 path.addRect(4, 16, 13, 13, SkPath::kCW_Direction);
862 testSimplify(reporter, path);
863}
864
865static void testLine41(skiatest::Reporter* reporter) {
866 SkPath path;
867 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
868 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
869 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
870 testSimplify(reporter, path);
871}
872
873static void testLine41x(skiatest::Reporter* reporter) {
874 SkPath path;
875 path.setFillType(SkPath::kEvenOdd_FillType);
876 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
877 path.addRect(18, 24, 30, 30, SkPath::kCW_Direction);
878 path.addRect(12, 0, 21, 21, SkPath::kCW_Direction);
879 testSimplify(reporter, path);
880}
881
882static void testLine42(skiatest::Reporter* reporter) {
883 SkPath path;
884 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
885 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
886 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
887 testSimplify(reporter, path);
888}
889
890static void testLine42x(skiatest::Reporter* reporter) {
891 SkPath path;
892 path.setFillType(SkPath::kEvenOdd_FillType);
893 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
894 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
895 path.addRect(8, 16, 17, 17, SkPath::kCW_Direction);
896 testSimplify(reporter, path);
897}
898
899static void testLine43(skiatest::Reporter* reporter) {
900 SkPath path;
901 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
902 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
903 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
904 testSimplify(reporter, path);
905}
906
907static void testLine43x(skiatest::Reporter* reporter) {
908 SkPath path;
909 path.setFillType(SkPath::kEvenOdd_FillType);
910 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
911 path.addRect(6, 24, 18, 18, SkPath::kCW_Direction);
912 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
913 testSimplify(reporter, path);
914}
915
916static void testLine44(skiatest::Reporter* reporter) {
917 SkPath path;
918 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
919 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
920 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
921 testSimplify(reporter, path);
922}
923
924static void testLine44x(skiatest::Reporter* reporter) {
925 SkPath path;
926 path.setFillType(SkPath::kEvenOdd_FillType);
927 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
928 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
929 path.addRect(18, 32, 27, 36, SkPath::kCCW_Direction);
930 testSimplify(reporter, path);
931}
932
933static void testLine45(skiatest::Reporter* reporter) {
934 SkPath path;
935 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
936 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
937 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
938 testSimplify(reporter, path);
939}
940
941static void testLine45x(skiatest::Reporter* reporter) {
942 SkPath path;
943 path.setFillType(SkPath::kEvenOdd_FillType);
944 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
945 path.addRect(18, 0, 30, 30, SkPath::kCW_Direction);
946 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
947 testSimplify(reporter, path);
948}
949
950static void testLine46(skiatest::Reporter* reporter) {
951 SkPath path;
952 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
953 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
954 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
955 testSimplify(reporter, path);
956}
957
958static void testLine46x(skiatest::Reporter* reporter) {
959 SkPath path;
960 path.setFillType(SkPath::kEvenOdd_FillType);
961 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
962 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
963 path.addRect(24, 32, 33, 36, SkPath::kCW_Direction);
964 testSimplify(reporter, path);
965}
966
967static void testLine47(skiatest::Reporter* reporter) {
968 SkPath path;
969 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
970 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
971 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
972 testSimplify(reporter, path);
973}
974
975static void testLine47x(skiatest::Reporter* reporter) {
976 SkPath path;
977 path.setFillType(SkPath::kEvenOdd_FillType);
978 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
979 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
980 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
981 testSimplify(reporter, path);
982}
983
984static void testLine48(skiatest::Reporter* reporter) {
985 SkPath path;
986 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
987 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
988 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
989 testSimplify(reporter, path);
990}
991
992static void testLine48x(skiatest::Reporter* reporter) {
993 SkPath path;
994 path.setFillType(SkPath::kEvenOdd_FillType);
995 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
996 path.addRect(0, 6, 12, 12, SkPath::kCW_Direction);
997 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
998 testSimplify(reporter, path);
999}
1000
1001static void testLine49(skiatest::Reporter* reporter) {
1002 SkPath path;
1003 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1004 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
1005 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
1006 testSimplify(reporter, path);
1007}
1008
1009static void testLine49x(skiatest::Reporter* reporter) {
1010 SkPath path;
1011 path.setFillType(SkPath::kEvenOdd_FillType);
1012 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1013 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
1014 path.addRect(0, 0, 9, 9, SkPath::kCW_Direction);
1015 testSimplify(reporter, path);
1016}
1017
1018static void testLine50(skiatest::Reporter* reporter) {
1019 SkPath path;
1020 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1021 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1022 testSimplify(reporter, path);
1023}
1024
1025static void testLine50x(skiatest::Reporter* reporter) {
1026 SkPath path;
1027 path.setFillType(SkPath::kEvenOdd_FillType);
1028 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1029 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1030 testSimplify(reporter, path);
1031}
1032
1033static void testLine51(skiatest::Reporter* reporter) {
1034 SkPath path;
1035 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1036 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1037 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1038 testSimplify(reporter, path);
1039}
1040
1041static void testLine51x(skiatest::Reporter* reporter) {
1042 SkPath path;
1043 path.setFillType(SkPath::kEvenOdd_FillType);
1044 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1045 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1046 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1047 testSimplify(reporter, path);
1048}
1049
1050static void testLine52(skiatest::Reporter* reporter) {
1051 SkPath path;
1052 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1053 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1054 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1055 testSimplify(reporter, path);
1056}
1057
1058static void testLine52x(skiatest::Reporter* reporter) {
1059 SkPath path;
1060 path.setFillType(SkPath::kEvenOdd_FillType);
1061 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1062 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1063 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1064 testSimplify(reporter, path);
1065}
1066
1067static void testLine53(skiatest::Reporter* reporter) {
1068 SkPath path;
1069 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1070 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1071 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1072 testSimplify(reporter, path);
1073}
1074
1075static void testLine53x(skiatest::Reporter* reporter) {
1076 SkPath path;
1077 path.setFillType(SkPath::kEvenOdd_FillType);
1078 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
1079 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1080 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1081 testSimplify(reporter, path);
1082}
1083
1084static void testLine54(skiatest::Reporter* reporter) {
1085 SkPath path;
1086 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1087 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
1088 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
1089 testSimplify(reporter, path);
1090}
1091
1092static void testLine54x(skiatest::Reporter* reporter) {
1093 SkPath path;
1094 path.setFillType(SkPath::kEvenOdd_FillType);
1095 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1096 path.addRect(6, 0, 18, 18, SkPath::kCW_Direction);
1097 path.addRect(8, 4, 17, 17, SkPath::kCCW_Direction);
1098 testSimplify(reporter, path);
1099}
1100
1101static void testLine55(skiatest::Reporter* reporter) {
1102 SkPath path;
1103 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1104 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
1105 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1106 testSimplify(reporter, path);
1107}
1108
1109static void testLine55x(skiatest::Reporter* reporter) {
1110 SkPath path;
1111 path.setFillType(SkPath::kEvenOdd_FillType);
1112 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1113 path.addRect(6, 6, 18, 18, SkPath::kCW_Direction);
1114 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1115 testSimplify(reporter, path);
1116}
1117
1118static void testLine56(skiatest::Reporter* reporter) {
1119 SkPath path;
1120 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1121 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
1122 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1123 testSimplify(reporter, path);
1124}
1125
1126static void testLine56x(skiatest::Reporter* reporter) {
1127 SkPath path;
1128 path.setFillType(SkPath::kEvenOdd_FillType);
1129 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1130 path.addRect(18, 20, 30, 30, SkPath::kCW_Direction);
1131 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1132 testSimplify(reporter, path);
1133}
1134
1135static void testLine57(skiatest::Reporter* reporter) {
1136 SkPath path;
1137 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1138 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
1139 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1140 testSimplify(reporter, path);
1141}
1142
1143static void testLine57x(skiatest::Reporter* reporter) {
1144 SkPath path;
1145 path.setFillType(SkPath::kEvenOdd_FillType);
1146 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1147 path.addRect(20, 0, 30, 40, SkPath::kCW_Direction);
1148 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1149 testSimplify(reporter, path);
1150}
1151
1152static void testLine58(skiatest::Reporter* reporter) {
1153 SkPath path;
1154 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1155 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
1156 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
1157 testSimplify(reporter, path);
1158}
1159
1160static void testLine58x(skiatest::Reporter* reporter) {
1161 SkPath path;
1162 path.setFillType(SkPath::kEvenOdd_FillType);
1163 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1164 path.addRect(0, 0, 12, 12, SkPath::kCCW_Direction);
1165 path.addRect(0, 12, 9, 9, SkPath::kCCW_Direction);
1166 testSimplify(reporter, path);
1167}
1168
1169static void testLine59(skiatest::Reporter* reporter) {
1170 SkPath path;
1171 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1172 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
1173 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1174 testSimplify(reporter, path);
1175}
1176
1177static void testLine59x(skiatest::Reporter* reporter) {
1178 SkPath path;
1179 path.setFillType(SkPath::kEvenOdd_FillType);
1180 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1181 path.addRect(6, 6, 18, 18, SkPath::kCCW_Direction);
1182 path.addRect(4, 4, 13, 13, SkPath::kCCW_Direction);
1183 testSimplify(reporter, path);
1184}
1185
1186static void testLine60(skiatest::Reporter* reporter) {
1187 SkPath path;
1188 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1189 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
1190 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1191 testSimplify(reporter, path);
1192}
1193
1194static void testLine60x(skiatest::Reporter* reporter) {
1195 SkPath path;
1196 path.setFillType(SkPath::kEvenOdd_FillType);
1197 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1198 path.addRect(6, 12, 18, 18, SkPath::kCCW_Direction);
1199 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1200 testSimplify(reporter, path);
1201}
1202
1203static void testLine61(skiatest::Reporter* reporter) {
1204 SkPath path;
1205 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1206 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
1207 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1208 testSimplify(reporter, path);
1209}
1210
1211static void testLine61x(skiatest::Reporter* reporter) {
1212 SkPath path;
1213 path.setFillType(SkPath::kEvenOdd_FillType);
1214 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1215 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
1216 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1217 testSimplify(reporter, path);
1218}
1219
1220static void testLine62(skiatest::Reporter* reporter) {
1221 SkPath path;
1222 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1223 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1224 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1225 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1226 testSimplify(reporter, path);
1227}
1228
1229static void testLine62x(skiatest::Reporter* reporter) {
1230 SkPath path;
1231 path.setFillType(SkPath::kEvenOdd_FillType);
1232 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1233 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1234 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
1235 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
1236 testSimplify(reporter, path);
1237}
1238
1239static void testLine63(skiatest::Reporter* reporter) {
1240 SkPath path;
1241 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1242 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
1243 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
1244 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1245 testSimplify(reporter, path);
1246}
1247
1248static void testLine63x(skiatest::Reporter* reporter) {
1249 SkPath path;
1250 path.setFillType(SkPath::kEvenOdd_FillType);
1251 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1252 path.addRect(0, 10, 20, 20, SkPath::kCW_Direction);
1253 path.addRect(0, 6, 12, 12, SkPath::kCCW_Direction);
1254 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1255 testSimplify(reporter, path);
1256}
1257
1258static void testLine64(skiatest::Reporter* reporter) {
1259 SkPath path;
1260 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1261 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1262 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
1263 testSimplify(reporter, path);
1264}
1265
1266static void testLine64x(skiatest::Reporter* reporter) {
1267 SkPath path;
1268 path.setFillType(SkPath::kEvenOdd_FillType);
1269 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1270 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1271 path.addRect(18, 6, 30, 30, SkPath::kCW_Direction);
1272 testSimplify(reporter, path);
1273}
1274
1275static void testLine65(skiatest::Reporter* reporter) {
1276 SkPath path;
1277 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1278 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
1279 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
1280 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1281 testSimplify(reporter, path);
1282}
1283
1284static void testLine65x(skiatest::Reporter* reporter) {
1285 SkPath path;
1286 path.setFillType(SkPath::kEvenOdd_FillType);
1287 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1288 path.addRect(10, 0, 30, 30, SkPath::kCW_Direction);
1289 path.addRect(24, 0, 36, 36, SkPath::kCW_Direction);
1290 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1291 testSimplify(reporter, path);
1292}
1293
1294static void testLine66(skiatest::Reporter* reporter) {
1295 SkPath path;
1296 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1297 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1298 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1299 testSimplify(reporter, path);
1300}
1301
1302static void testLine66x(skiatest::Reporter* reporter) {
1303 SkPath path;
1304 path.setFillType(SkPath::kEvenOdd_FillType);
1305 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1306 path.addRect(0, 30, 20, 20, SkPath::kCW_Direction);
1307 path.addRect(12, 20, 24, 30, SkPath::kCW_Direction);
1308 testSimplify(reporter, path);
1309}
1310
1311static void testLine67(skiatest::Reporter* reporter) {
1312 SkPath path;
1313 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1314 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1315 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1316 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1317 testSimplify(reporter, path);
1318}
1319
1320static void testLine67x(skiatest::Reporter* reporter) {
1321 SkPath path;
1322 path.setFillType(SkPath::kEvenOdd_FillType);
1323 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1324 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1325 path.addRect(24, 20, 36, 30, SkPath::kCW_Direction);
1326 path.addRect(32, 0, 36, 41, SkPath::kCW_Direction);
1327 testSimplify(reporter, path);
1328}
1329
1330static void testLine68a(skiatest::Reporter* reporter) {
1331 SkPath path;
1332 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1333 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1334 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1335 testSimplify(reporter, path);
1336}
1337
1338static void testLine68ax(skiatest::Reporter* reporter) {
1339 SkPath path;
1340 path.setFillType(SkPath::kEvenOdd_FillType);
1341 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1342 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1343 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1344 testSimplify(reporter, path);
1345}
1346
1347static void testLine68b(skiatest::Reporter* reporter) {
1348 SkPath path;
1349 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1350 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1351 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1352 testSimplify(reporter, path);
1353}
1354
1355static void testLine68bx(skiatest::Reporter* reporter) {
1356 SkPath path;
1357 path.setFillType(SkPath::kEvenOdd_FillType);
1358 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1359 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1360 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1361 testSimplify(reporter, path);
1362}
1363
1364static void testLine68c(skiatest::Reporter* reporter) {
1365 SkPath path;
1366 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1367 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1368 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1369 testSimplify(reporter, path);
1370}
1371
1372static void testLine68cx(skiatest::Reporter* reporter) {
1373 SkPath path;
1374 path.setFillType(SkPath::kEvenOdd_FillType);
1375 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1376 path.addRect(2, 2, 6, 6, SkPath::kCW_Direction);
1377 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1378 testSimplify(reporter, path);
1379}
1380
1381static void testLine68d(skiatest::Reporter* reporter) {
1382 SkPath path;
1383 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1384 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1385 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1386 testSimplify(reporter, path);
1387}
1388
1389static void testLine68dx(skiatest::Reporter* reporter) {
1390 SkPath path;
1391 path.setFillType(SkPath::kEvenOdd_FillType);
1392 path.addRect(0, 0, 8, 8, SkPath::kCCW_Direction);
1393 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1394 path.addRect(1, 2, 4, 2, SkPath::kCW_Direction);
1395 testSimplify(reporter, path);
1396}
1397
1398static void testLine68e(skiatest::Reporter* reporter) {
1399 SkPath path;
1400 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1401 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1402 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1403 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1404 testSimplify(reporter, path);
1405}
1406
1407static void testLine68ex(skiatest::Reporter* reporter) {
1408 SkPath path;
1409 path.setFillType(SkPath::kEvenOdd_FillType);
1410 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1411 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1412 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1413 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1414 testSimplify(reporter, path);
1415}
1416
1417static void testLine68f(skiatest::Reporter* reporter) {
1418 SkPath path;
1419 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1420 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1421 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1422 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1423 testSimplify(reporter, path);
1424}
1425
1426static void testLine68fx(skiatest::Reporter* reporter) {
1427 SkPath path;
1428 path.setFillType(SkPath::kEvenOdd_FillType);
1429 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1430 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1431 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1432 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1433 testSimplify(reporter, path);
1434}
1435
1436static void testLine68g(skiatest::Reporter* reporter) {
1437 SkPath path;
1438 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1439 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1440 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1441 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1442 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1443 testSimplify(reporter, path);
1444}
1445
1446static void testLine68gx(skiatest::Reporter* reporter) {
1447 SkPath path;
1448 path.setFillType(SkPath::kEvenOdd_FillType);
1449 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1450 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1451 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1452 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1453 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1454 testSimplify(reporter, path);
1455}
1456
1457static void testLine68h(skiatest::Reporter* reporter) {
1458 SkPath path;
1459 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1460 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1461 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1462 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1463 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1464 testSimplify(reporter, path);
1465}
1466
1467static void testLine68hx(skiatest::Reporter* reporter) {
1468 SkPath path;
1469 path.setFillType(SkPath::kEvenOdd_FillType);
1470 path.addRect(0, 0, 8, 8, SkPath::kCW_Direction);
1471 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1472 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1473 path.addRect(2, 2, 6, 6, SkPath::kCCW_Direction);
1474 path.addRect(1, 2, 2, 2, SkPath::kCW_Direction);
1475 testSimplify(reporter, path);
1476}
1477
1478static void testLine69(skiatest::Reporter* reporter) {
1479 SkPath path;
1480 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1481 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1482 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1483 testSimplify(reporter, path);
1484}
1485
1486static void testLine69x(skiatest::Reporter* reporter) {
1487 SkPath path;
1488 path.setFillType(SkPath::kEvenOdd_FillType);
1489 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
1490 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1491 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1492 testSimplify(reporter, path);
1493}
1494
1495static void testLine70(skiatest::Reporter* reporter) {
1496 SkPath path;
1497 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1498 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
1499 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1500 testSimplify(reporter, path);
1501}
1502
1503static void testLine70x(skiatest::Reporter* reporter) {
1504 SkPath path;
1505 path.setFillType(SkPath::kEvenOdd_FillType);
1506 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1507 path.addRect(0, 24, 12, 12, SkPath::kCW_Direction);
1508 path.addRect(12, 32, 21, 36, SkPath::kCCW_Direction);
1509 testSimplify(reporter, path);
1510}
1511
1512static void testLine71(skiatest::Reporter* reporter) {
1513 SkPath path;
1514 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1515 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
1516 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1517 testSimplify(reporter, path);
1518}
1519
1520static void testLine71x(skiatest::Reporter* reporter) {
1521 SkPath path;
1522 path.setFillType(SkPath::kEvenOdd_FillType);
1523 path.addRect(0, 0, 20, 20, SkPath::kCW_Direction);
1524 path.addRect(12, 0, 24, 24, SkPath::kCW_Direction);
1525 path.addRect(12, 32, 21, 36, SkPath::kCW_Direction);
1526 testSimplify(reporter, path);
1527}
1528
1529static void testLine72(skiatest::Reporter* reporter) {
1530 SkPath path;
1531 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1532 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1533 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1534 testSimplify(reporter, path);
1535}
1536
1537static void testLine72x(skiatest::Reporter* reporter) {
1538 SkPath path;
1539 path.setFillType(SkPath::kEvenOdd_FillType);
1540 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1541 path.addRect(10, 40, 30, 30, SkPath::kCW_Direction);
1542 path.addRect(6, 20, 18, 30, SkPath::kCW_Direction);
1543 testSimplify(reporter, path);
1544}
1545
1546static void testLine73(skiatest::Reporter* reporter) {
1547 SkPath path;
1548 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1549 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
1550 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1551 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
1552 testSimplify(reporter, path);
1553}
1554
1555static void testLine73x(skiatest::Reporter* reporter) {
1556 SkPath path;
1557 path.setFillType(SkPath::kEvenOdd_FillType);
1558 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1559 path.addRect(0, 40, 20, 20, SkPath::kCW_Direction);
1560 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
1561 path.addRect(0, 0, 9, 9, SkPath::kCCW_Direction);
1562 testSimplify(reporter, path);
1563}
1564
1565static void testLine74(skiatest::Reporter* reporter) {
1566 SkPath path;
1567 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
1568 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1569 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
1570 testSimplify(reporter, path);
1571}
1572
1573static void testLine74x(skiatest::Reporter* reporter) {
1574 SkPath path;
1575 path.setFillType(SkPath::kEvenOdd_FillType);
1576 path.addRect(20, 30, 40, 40, SkPath::kCW_Direction);
1577 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1578 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
1579 testSimplify(reporter, path);
1580}
1581
1582static void testLine75(skiatest::Reporter* reporter) {
1583 SkPath path;
1584 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1585 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
1586 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
1587 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1588 testSimplify(reporter, path);
1589}
1590
1591static void testLine75x(skiatest::Reporter* reporter) {
1592 SkPath path;
1593 path.setFillType(SkPath::kEvenOdd_FillType);
1594 path.addRect(0, 0, 60, 60, SkPath::kCW_Direction);
1595 path.addRect(10, 0, 30, 30, SkPath::kCCW_Direction);
1596 path.addRect(18, 0, 30, 30, SkPath::kCCW_Direction);
1597 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
1598 testSimplify(reporter, path);
1599}
1600
1601static void testLine76(skiatest::Reporter* reporter) {
1602 SkPath path;
1603 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
1604 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
1605 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1606 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1607 testSimplify(reporter, path);
1608}
1609
1610static void testLine76x(skiatest::Reporter* reporter) {
1611 SkPath path;
1612 path.setFillType(SkPath::kEvenOdd_FillType);
1613 path.addRect(36, 0, 66, 60, SkPath::kCW_Direction);
1614 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
1615 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
1616 path.addRect(32, 6, 36, 41, SkPath::kCCW_Direction);
1617 testSimplify(reporter, path);
1618}
1619
1620static void testLine77(skiatest::Reporter* reporter) {
1621 SkPath path;
1622 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1623 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
1624 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
1625 testSimplify(reporter, path);
1626}
1627
1628static void testLine77x(skiatest::Reporter* reporter) {
1629 SkPath path;
1630 path.setFillType(SkPath::kEvenOdd_FillType);
1631 path.addRect(20, 0, 40, 40, SkPath::kCW_Direction);
1632 path.addRect(24, 6, 36, 36, SkPath::kCCW_Direction);
1633 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
1634 testSimplify(reporter, path);
1635}
1636
1637static void testLine78(skiatest::Reporter* reporter) {
1638 SkPath path;
1639 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
1640 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
1641 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
1642 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
1643 testSimplify(reporter, path);
1644}
1645
1646static void testLine78x(skiatest::Reporter* reporter) {
1647 SkPath path;
1648 path.setFillType(SkPath::kEvenOdd_FillType);
1649 path.addRect(0, 0, 30, 60, SkPath::kCW_Direction);
1650 path.addRect(10, 20, 30, 30, SkPath::kCCW_Direction);
1651 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
1652 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
1653 testSimplify(reporter, path);
1654}
1655
1656static void testLine79(skiatest::Reporter* reporter) {
1657 SkPath path;
1658 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
1659 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
1660 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
1661 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1662 testSimplify(reporter, path);
1663}
1664
1665static void testLine79x(skiatest::Reporter* reporter) {
1666 SkPath path;
1667 path.setFillType(SkPath::kEvenOdd_FillType);
1668 path.addRect(0, 36, 60, 30, SkPath::kCW_Direction);
1669 path.addRect(10, 30, 40, 30, SkPath::kCW_Direction);
1670 path.addRect(0, 20, 12, 30, SkPath::kCCW_Direction);
1671 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
1672 testSimplify(reporter, path);
1673}
1674
1675static void testLine81(skiatest::Reporter* reporter) {
1676 SkPath path;
1677 path.addRect(-1, -1, 3, 3, SkPath::kCW_Direction);
1678 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1679 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1680 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
1681 path.addRect(1, 1, 2, 2, SkPath::kCCW_Direction);
1682 testSimplify(reporter, path);
1683}
1684
1685static void testDegenerate1(skiatest::Reporter* reporter) {
1686 SkPath path;
1687 path.moveTo(0, 0);
1688 path.lineTo(0, 0);
1689 path.lineTo(2, 0);
1690 path.close();
1691 path.moveTo(0, 0);
1692 path.lineTo(1, 0);
1693 path.lineTo(2, 0);
1694 path.close();
1695 testSimplify(reporter, path);
1696}
1697
1698static void testDegenerate1x(skiatest::Reporter* reporter) {
1699 SkPath path;
1700 path.setFillType(SkPath::kEvenOdd_FillType);
1701 path.moveTo(0, 0);
1702 path.lineTo(0, 0);
1703 path.lineTo(2, 0);
1704 path.close();
1705 path.moveTo(0, 0);
1706 path.lineTo(1, 0);
1707 path.lineTo(2, 0);
1708 path.close();
1709 testSimplify(reporter, path);
1710}
1711
1712static void testDegenerate2(skiatest::Reporter* reporter) {
1713 SkPath path;
1714 path.moveTo(0, 0);
1715 path.lineTo(0, 0);
1716 path.lineTo(0, 0);
1717 path.close();
1718 path.moveTo(0, 0);
1719 path.lineTo(1, 0);
1720 path.lineTo(0, 1);
1721 path.close();
1722 testSimplify(reporter, path);
1723}
1724
1725static void testDegenerate2x(skiatest::Reporter* reporter) {
1726 SkPath path;
1727 path.setFillType(SkPath::kEvenOdd_FillType);
1728 path.moveTo(0, 0);
1729 path.lineTo(0, 0);
1730 path.lineTo(0, 0);
1731 path.close();
1732 path.moveTo(0, 0);
1733 path.lineTo(1, 0);
1734 path.lineTo(0, 1);
1735 path.close();
1736 testSimplify(reporter, path);
1737}
1738
1739static void testDegenerate3(skiatest::Reporter* reporter) {
1740 SkPath path;
1741 path.moveTo(0, 0);
1742 path.lineTo(2, 0);
1743 path.lineTo(1, 0);
1744 path.close();
1745 path.moveTo(0, 0);
1746 path.lineTo(0, 0);
1747 path.lineTo(3, 0);
1748 path.close();
1749 testSimplify(reporter, path);
1750}
1751
1752static void testDegenerate3x(skiatest::Reporter* reporter) {
1753 SkPath path;
1754 path.setFillType(SkPath::kEvenOdd_FillType);
1755 path.moveTo(0, 0);
1756 path.lineTo(2, 0);
1757 path.lineTo(1, 0);
1758 path.close();
1759 path.moveTo(0, 0);
1760 path.lineTo(0, 0);
1761 path.lineTo(3, 0);
1762 path.close();
1763 testSimplify(reporter, path);
1764}
1765
1766static void testDegenerate4(skiatest::Reporter* reporter) {
1767 SkPath path;
1768 path.moveTo(0, 0);
1769 path.lineTo(1, 0);
1770 path.lineTo(1, 3);
1771 path.close();
1772 path.moveTo(1, 0);
1773 path.lineTo(1, 1);
1774 path.lineTo(1, 2);
1775 path.close();
1776 testSimplify(reporter, path);
1777}
1778
1779static void testDegenerate4x(skiatest::Reporter* reporter) {
1780 SkPath path;
1781 path.setFillType(SkPath::kEvenOdd_FillType);
1782 path.moveTo(0, 0);
1783 path.lineTo(1, 0);
1784 path.lineTo(1, 3);
1785 path.close();
1786 path.moveTo(1, 0);
1787 path.lineTo(1, 1);
1788 path.lineTo(1, 2);
1789 path.close();
1790 testSimplify(reporter, path);
1791}
1792
1793static void testNondegenerate1(skiatest::Reporter* reporter) {
1794 SkPath path;
1795 path.moveTo(0, 0);
1796 path.lineTo(3, 0);
1797 path.lineTo(1, 3);
1798 path.close();
1799 path.moveTo(1, 1);
1800 path.lineTo(2, 1);
1801 path.lineTo(1, 2);
1802 path.close();
1803 testSimplify(reporter, path);
1804}
1805
1806static void testNondegenerate1x(skiatest::Reporter* reporter) {
1807 SkPath path;
1808 path.setFillType(SkPath::kEvenOdd_FillType);
1809 path.moveTo(0, 0);
1810 path.lineTo(3, 0);
1811 path.lineTo(1, 3);
1812 path.close();
1813 path.moveTo(1, 1);
1814 path.lineTo(2, 1);
1815 path.lineTo(1, 2);
1816 path.close();
1817 testSimplify(reporter, path);
1818}
1819
1820static void testNondegenerate2(skiatest::Reporter* reporter) {
1821 SkPath path;
1822 path.moveTo(1, 0);
1823 path.lineTo(0, 1);
1824 path.lineTo(1, 1);
1825 path.close();
1826 path.moveTo(0, 2);
1827 path.lineTo(0, 3);
1828 path.lineTo(1, 2);
1829 path.close();
1830 testSimplify(reporter, path);
1831}
1832
1833static void testNondegenerate2x(skiatest::Reporter* reporter) {
1834 SkPath path;
1835 path.setFillType(SkPath::kEvenOdd_FillType);
1836 path.moveTo(1, 0);
1837 path.lineTo(0, 1);
1838 path.lineTo(1, 1);
1839 path.close();
1840 path.moveTo(0, 2);
1841 path.lineTo(0, 3);
1842 path.lineTo(1, 2);
1843 path.close();
1844 testSimplify(reporter, path);
1845}
1846
1847static void testNondegenerate3(skiatest::Reporter* reporter) {
1848 SkPath path;
1849 path.moveTo(0, 0);
1850 path.lineTo(1, 0);
1851 path.lineTo(2, 1);
1852 path.close();
1853 path.moveTo(0, 1);
1854 path.lineTo(1, 1);
1855 path.lineTo(0, 2);
1856 path.close();
1857 testSimplify(reporter, path);
1858}
1859
1860static void testNondegenerate3x(skiatest::Reporter* reporter) {
1861 SkPath path;
1862 path.setFillType(SkPath::kEvenOdd_FillType);
1863 path.moveTo(0, 0);
1864 path.lineTo(1, 0);
1865 path.lineTo(2, 1);
1866 path.close();
1867 path.moveTo(0, 1);
1868 path.lineTo(1, 1);
1869 path.lineTo(0, 2);
1870 path.close();
1871 testSimplify(reporter, path);
1872}
1873
1874static void testNondegenerate4(skiatest::Reporter* reporter) {
1875 SkPath path;
1876 path.moveTo(1, 0);
1877 path.lineTo(0, 1);
1878 path.lineTo(1, 2);
1879 path.close();
1880 path.moveTo(0, 2);
1881 path.lineTo(0, 3);
1882 path.lineTo(1, 3);
1883 path.close();
1884 testSimplify(reporter, path);
1885}
1886
1887static void testNondegenerate4x(skiatest::Reporter* reporter) {
1888 SkPath path;
1889 path.setFillType(SkPath::kEvenOdd_FillType);
1890 path.moveTo(1, 0);
1891 path.lineTo(0, 1);
1892 path.lineTo(1, 2);
1893 path.close();
1894 path.moveTo(0, 2);
1895 path.lineTo(0, 3);
1896 path.lineTo(1, 3);
1897 path.close();
1898 testSimplify(reporter, path);
1899}
1900
1901static void testQuadralateral5(skiatest::Reporter* reporter) {
1902 SkPath path;
1903 path.moveTo(0, 0);
1904 path.lineTo(0, 0);
1905 path.lineTo(1, 0);
1906 path.lineTo(1, 1);
1907 path.close();
1908 path.moveTo(0, 0);
1909 path.lineTo(2, 2);
1910 path.lineTo(3, 2);
1911 path.lineTo(3, 3);
1912 path.close();
1913 testSimplify(reporter, path);
1914}
1915
1916static void testQuadralateral5x(skiatest::Reporter* reporter) {
1917 SkPath path;
1918 path.setFillType(SkPath::kEvenOdd_FillType);
1919 path.moveTo(0, 0);
1920 path.lineTo(0, 0);
1921 path.lineTo(1, 0);
1922 path.lineTo(1, 1);
1923 path.close();
1924 path.moveTo(0, 0);
1925 path.lineTo(2, 2);
1926 path.lineTo(3, 2);
1927 path.lineTo(3, 3);
1928 path.close();
1929 testSimplify(reporter, path);
1930}
1931
1932static void testQuadralateral6(skiatest::Reporter* reporter) {
1933 SkPath path;
1934 path.moveTo(0, 0);
1935 path.lineTo(0, 0);
1936 path.lineTo(1, 0);
1937 path.lineTo(1, 1);
1938 path.close();
1939 path.moveTo(1, 0);
1940 path.lineTo(2, 0);
1941 path.lineTo(0, 2);
1942 path.lineTo(2, 2);
1943 path.close();
1944 testSimplify(reporter, path);
1945}
1946
1947static void testQuadralateral6x(skiatest::Reporter* reporter) {
1948 SkPath path;
1949 path.setFillType(SkPath::kEvenOdd_FillType);
1950 path.moveTo(0, 0);
1951 path.lineTo(0, 0);
1952 path.lineTo(1, 0);
1953 path.lineTo(1, 1);
1954 path.close();
1955 path.moveTo(1, 0);
1956 path.lineTo(2, 0);
1957 path.lineTo(0, 2);
1958 path.lineTo(2, 2);
1959 path.close();
1960 testSimplify(reporter, path);
1961}
1962
1963static void testFauxQuadralateral6(skiatest::Reporter* reporter) {
1964 SkPath path;
1965 path.moveTo(0, 0);
1966 path.lineTo(1, 0);
1967 path.lineTo(1, 1);
1968 path.close();
1969 path.moveTo(1, 0);
1970 path.lineTo(2, 0);
1971 path.lineTo(1 + 1.0f/3, 2.0f/3);
1972 path.close();
1973 path.moveTo(1 + 1.0f/3, 2.0f/3);
1974 path.lineTo(0, 2);
1975 path.lineTo(2, 2);
1976 path.close();
1977 testSimplify(reporter, path);
1978}
1979
1980static void testFauxQuadralateral6x(skiatest::Reporter* reporter) {
1981 SkPath path;
1982 path.setFillType(SkPath::kEvenOdd_FillType);
1983 path.moveTo(0, 0);
1984 path.lineTo(1, 0);
1985 path.lineTo(1, 1);
1986 path.close();
1987 path.moveTo(1, 0);
1988 path.lineTo(2, 0);
1989 path.lineTo(1 + 1.0f/3, 2.0f/3);
1990 path.close();
1991 path.moveTo(1 + 1.0f/3, 2.0f/3);
1992 path.lineTo(0, 2);
1993 path.lineTo(2, 2);
1994 path.close();
1995 testSimplify(reporter, path);
1996}
1997
1998static void testFauxQuadralateral6a(skiatest::Reporter* reporter) {
1999 SkPath path;
2000 path.moveTo(0, 0);
2001 path.lineTo(3, 0);
2002 path.lineTo(3, 3);
2003 path.close();
2004 path.moveTo(3, 0);
2005 path.lineTo(6, 0);
2006 path.lineTo(4, 2);
2007 path.close();
2008 path.moveTo(4, 2);
2009 path.lineTo(0, 6);
2010 path.lineTo(6, 6);
2011 path.close();
2012 testSimplify(reporter, path);
2013}
2014
2015static void testFauxQuadralateral6ax(skiatest::Reporter* reporter) {
2016 SkPath path;
2017 path.setFillType(SkPath::kEvenOdd_FillType);
2018 path.moveTo(0, 0);
2019 path.lineTo(3, 0);
2020 path.lineTo(3, 3);
2021 path.close();
2022 path.moveTo(3, 0);
2023 path.lineTo(6, 0);
2024 path.lineTo(4, 2);
2025 path.close();
2026 path.moveTo(4, 2);
2027 path.lineTo(0, 6);
2028 path.lineTo(6, 6);
2029 path.close();
2030 testSimplify(reporter, path);
2031}
2032
2033static void testFauxQuadralateral6b(skiatest::Reporter* reporter) {
2034 SkPath path;
2035 path.moveTo(0, 0);
2036 path.lineTo(3, 0);
2037 path.lineTo(3, 3);
2038 path.close();
2039 path.moveTo(3, 0);
2040 path.lineTo(6, 0);
2041 path.lineTo(4, 2);
2042 path.close();
2043 path.moveTo(4, 2);
2044 path.lineTo(6, 6);
2045 path.lineTo(0, 6);
2046 path.close();
2047 testSimplify(reporter, path);
2048}
2049
2050static void testFauxQuadralateral6bx(skiatest::Reporter* reporter) {
2051 SkPath path;
2052 path.setFillType(SkPath::kEvenOdd_FillType);
2053 path.moveTo(0, 0);
2054 path.lineTo(3, 0);
2055 path.lineTo(3, 3);
2056 path.close();
2057 path.moveTo(3, 0);
2058 path.lineTo(6, 0);
2059 path.lineTo(4, 2);
2060 path.close();
2061 path.moveTo(4, 2);
2062 path.lineTo(6, 6);
2063 path.lineTo(0, 6);
2064 path.close();
2065 testSimplify(reporter, path);
2066}
2067
2068static void testFauxQuadralateral6c(skiatest::Reporter* reporter) {
2069 SkPath path;
2070 path.moveTo(0, 0);
2071 path.lineTo(3, 3);
2072 path.lineTo(3, 0);
2073 path.close();
2074 path.moveTo(3, 0);
2075 path.lineTo(6, 0);
2076 path.lineTo(4, 2);
2077 path.close();
2078 path.moveTo(4, 2);
2079 path.lineTo(0, 6);
2080 path.lineTo(6, 6);
2081 path.close();
2082 testSimplify(reporter, path);
2083}
2084
2085static void testFauxQuadralateral6cx(skiatest::Reporter* reporter) {
2086 SkPath path;
2087 path.setFillType(SkPath::kEvenOdd_FillType);
2088 path.moveTo(0, 0);
2089 path.lineTo(3, 3);
2090 path.lineTo(3, 0);
2091 path.close();
2092 path.moveTo(3, 0);
2093 path.lineTo(6, 0);
2094 path.lineTo(4, 2);
2095 path.close();
2096 path.moveTo(4, 2);
2097 path.lineTo(0, 6);
2098 path.lineTo(6, 6);
2099 path.close();
2100 testSimplify(reporter, path);
2101}
2102
2103static void testFauxQuadralateral6d(skiatest::Reporter* reporter) {
2104 SkPath path;
2105 path.moveTo(0, 0);
2106 path.lineTo(3, 3);
2107 path.lineTo(3, 0);
2108 path.close();
2109 path.moveTo(3, 0);
2110 path.lineTo(6, 0);
2111 path.lineTo(4, 2);
2112 path.close();
2113 path.moveTo(4, 2);
2114 path.lineTo(6, 6);
2115 path.lineTo(0, 6);
2116 path.close();
2117 testSimplify(reporter, path);
2118}
2119
2120static void testFauxQuadralateral6dx(skiatest::Reporter* reporter) {
2121 SkPath path;
2122 path.setFillType(SkPath::kEvenOdd_FillType);
2123 path.moveTo(0, 0);
2124 path.lineTo(3, 3);
2125 path.lineTo(3, 0);
2126 path.close();
2127 path.moveTo(3, 0);
2128 path.lineTo(6, 0);
2129 path.lineTo(4, 2);
2130 path.close();
2131 path.moveTo(4, 2);
2132 path.lineTo(6, 6);
2133 path.lineTo(0, 6);
2134 path.close();
2135 testSimplify(reporter, path);
2136}
2137
2138static void testQuadralateral6a(skiatest::Reporter* reporter) {
2139 SkPath path;
2140 path.moveTo(0, 0);
2141 path.lineTo(0, 0);
2142 path.lineTo(3, 0);
2143 path.lineTo(3, 3);
2144 path.close();
2145 path.moveTo(3, 0);
2146 path.lineTo(6, 0);
2147 path.lineTo(0, 6);
2148 path.lineTo(6, 6);
2149 path.close();
2150 testSimplify(reporter, path);
2151}
2152
2153static void testQuadralateral6ax(skiatest::Reporter* reporter) {
2154 SkPath path;
2155 path.setFillType(SkPath::kEvenOdd_FillType);
2156 path.moveTo(0, 0);
2157 path.lineTo(0, 0);
2158 path.lineTo(3, 0);
2159 path.lineTo(3, 3);
2160 path.close();
2161 path.moveTo(3, 0);
2162 path.lineTo(6, 0);
2163 path.lineTo(0, 6);
2164 path.lineTo(6, 6);
2165 path.close();
2166 testSimplify(reporter, path);
2167}
2168
2169static void testQuadralateral7(skiatest::Reporter* reporter) {
2170 SkPath path;
2171 path.moveTo(0, 0);
2172 path.lineTo(0, 0);
2173 path.lineTo(1, 0);
2174 path.lineTo(2, 1);
2175 path.close();
2176 path.moveTo(1, 0);
2177 path.lineTo(1, 1);
2178 path.lineTo(2, 2);
2179 path.lineTo(1, 3);
2180 path.close();
2181 testSimplify(reporter, path);
2182}
2183
2184static void testQuadralateral7x(skiatest::Reporter* reporter) {
2185 SkPath path;
2186 path.setFillType(SkPath::kEvenOdd_FillType);
2187 path.moveTo(0, 0);
2188 path.lineTo(0, 0);
2189 path.lineTo(1, 0);
2190 path.lineTo(2, 1);
2191 path.close();
2192 path.moveTo(1, 0);
2193 path.lineTo(1, 1);
2194 path.lineTo(2, 2);
2195 path.lineTo(1, 3);
2196 path.close();
2197 testSimplify(reporter, path);
2198}
2199
2200static void testQuadralateral8(skiatest::Reporter* reporter) {
2201 SkPath path;
2202 path.moveTo(0, 0);
2203 path.lineTo(3, 1);
2204 path.lineTo(1, 3);
2205 path.lineTo(3, 3);
2206 path.close();
2207 path.moveTo(2, 1);
2208 path.lineTo(0, 2);
2209 path.lineTo(3, 2);
2210 path.lineTo(2, 3);
2211 path.close();
2212 testSimplify(reporter, path);
2213}
2214
2215static void testQuadralateral8x(skiatest::Reporter* reporter) {
2216 SkPath path;
2217 path.setFillType(SkPath::kEvenOdd_FillType);
2218 path.moveTo(0, 0);
2219 path.lineTo(3, 1);
2220 path.lineTo(1, 3);
2221 path.lineTo(3, 3);
2222 path.close();
2223 path.moveTo(2, 1);
2224 path.lineTo(0, 2);
2225 path.lineTo(3, 2);
2226 path.lineTo(2, 3);
2227 path.close();
2228 testSimplify(reporter, path);
2229}
2230
2231static void testQuadralateral9(skiatest::Reporter* reporter) {
2232 SkPath path;
2233 path.moveTo(0, 0);
2234 path.lineTo(1, 0);
2235 path.lineTo(1, 2);
2236 path.lineTo(2, 2);
2237 path.close();
2238 path.moveTo(1, 1);
2239 path.lineTo(2, 1);
2240 path.lineTo(1, 3);
2241 path.lineTo(2, 3);
2242 path.close();
2243 testSimplify(reporter, path);
2244}
2245
2246static void testQuadralateral9x(skiatest::Reporter* reporter) {
2247 SkPath path;
2248 path.setFillType(SkPath::kEvenOdd_FillType);
2249 path.moveTo(0, 0);
2250 path.lineTo(1, 0);
2251 path.lineTo(1, 2);
2252 path.lineTo(2, 2);
2253 path.close();
2254 path.moveTo(1, 1);
2255 path.lineTo(2, 1);
2256 path.lineTo(1, 3);
2257 path.lineTo(2, 3);
2258 path.close();
2259 testSimplify(reporter, path);
2260}
2261
2262static void testLine1a(skiatest::Reporter* reporter) {
2263 SkPath path;
2264 path.setFillType(SkPath::kWinding_FillType);
2265 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
2266 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
2267 testSimplify(reporter, path);
2268}
2269
2270static void testLine1ax(skiatest::Reporter* reporter) {
2271 SkPath path;
2272 path.setFillType(SkPath::kEvenOdd_FillType);
2273 path.addRect(0, 0, 12, 12, SkPath::kCW_Direction);
2274 path.addRect(4, 0, 13, 13, SkPath::kCCW_Direction);
2275 testSimplify(reporter, path);
2276}
2277
2278static void testLine2ax(skiatest::Reporter* reporter) {
2279 SkPath path;
2280 path.setFillType(SkPath::kEvenOdd_FillType);
2281 path.addRect(0, 20, 20, 20, SkPath::kCW_Direction);
2282 path.addRect(0, 20, 12, 30, SkPath::kCW_Direction);
2283 path.addRect(12, 0, 21, 21, SkPath::kCCW_Direction);
2284 testSimplify(reporter, path);
2285}
2286
2287static void testLine3aax(skiatest::Reporter* reporter) {
2288 SkPath path;
2289 path.setFillType(SkPath::kEvenOdd_FillType);
2290 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
2291 path.addRect(18, 20, 30, 30, SkPath::kCCW_Direction);
2292 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
2293 testSimplify(reporter, path);
2294}
2295
2296static void testLine4ax(skiatest::Reporter* reporter) {
2297 SkPath path;
2298 path.setFillType(SkPath::kEvenOdd_FillType);
2299 path.addRect(10, 30, 30, 30, SkPath::kCW_Direction);
2300 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
2301 path.addRect(0, 32, 9, 36, SkPath::kCCW_Direction);
2302 testSimplify(reporter, path);
2303}
2304
2305static void testQuadratic1(skiatest::Reporter* reporter) {
2306 SkPath path;
2307 path.moveTo(0, 0);
2308 path.quadTo(0, 0, 0, 0);
2309 path.lineTo(1, 0);
2310 path.close();
2311 path.moveTo(0, 0);
2312 path.lineTo(0, 0);
2313 path.quadTo(0, 0, 0, 0);
2314 path.close();
2315 testSimplify(reporter, path);
2316}
2317
2318static void testQuadratic1x(skiatest::Reporter* reporter) {
2319 SkPath path;
2320 path.setFillType(SkPath::kEvenOdd_FillType);
2321 path.moveTo(0, 0);
2322 path.quadTo(0, 0, 0, 0);
2323 path.lineTo(1, 0);
2324 path.close();
2325 path.moveTo(0, 0);
2326 path.lineTo(0, 0);
2327 path.quadTo(0, 0, 0, 0);
2328 path.close();
2329 testSimplify(reporter, path);
2330}
2331
2332static void testQuadratic2(skiatest::Reporter* reporter) {
2333 SkPath path;
2334 path.moveTo(0, 0);
2335 path.quadTo(0, 0, 0, 0);
2336 path.lineTo(3, 0);
2337 path.close();
2338 path.moveTo(0, 0);
2339 path.lineTo(0, 0);
2340 path.quadTo(1, 0, 0, 1);
2341 path.close();
2342 testSimplify(reporter, path);
2343}
2344
2345static void testQuadratic2x(skiatest::Reporter* reporter) {
2346 SkPath path;
2347 path.setFillType(SkPath::kEvenOdd_FillType);
2348 path.moveTo(0, 0);
2349 path.quadTo(0, 0, 0, 0);
2350 path.lineTo(3, 0);
2351 path.close();
2352 path.moveTo(0, 0);
2353 path.lineTo(0, 0);
2354 path.quadTo(1, 0, 0, 1);
2355 path.close();
2356 testSimplify(reporter, path);
2357}
2358
2359static void testQuadratic3(skiatest::Reporter* reporter) {
2360 SkPath path;
2361 path.moveTo(0, 0);
2362 path.quadTo(0, 0, 1, 0);
2363 path.lineTo(0, 2);
2364 path.close();
2365 path.moveTo(0, 0);
2366 path.lineTo(0, 0);
2367 path.quadTo(1, 0, 0, 1);
2368 path.close();
2369 testSimplify(reporter, path);
2370}
2371
2372static void testQuadratic3x(skiatest::Reporter* reporter) {
2373 SkPath path;
2374 path.setFillType(SkPath::kEvenOdd_FillType);
2375 path.moveTo(0, 0);
2376 path.quadTo(0, 0, 1, 0);
2377 path.lineTo(0, 2);
2378 path.close();
2379 path.moveTo(0, 0);
2380 path.lineTo(0, 0);
2381 path.quadTo(1, 0, 0, 1);
2382 path.close();
2383 testSimplify(reporter, path);
2384}
2385
2386static void testQuadratic4(skiatest::Reporter* reporter) {
2387 SkPath path;
2388 path.moveTo(0, 0);
2389 path.quadTo(0, 0, 1, 0);
2390 path.lineTo(0, 2);
2391 path.close();
2392 path.moveTo(0, 0);
2393 path.lineTo(0, 0);
2394 path.quadTo(1, 0, 0, 2);
2395 path.close();
2396 testSimplify(reporter, path);
2397}
2398
2399static void testQuadratic4x(skiatest::Reporter* reporter) {
2400 SkPath path;
2401 path.setFillType(SkPath::kEvenOdd_FillType);
2402 path.moveTo(0, 0);
2403 path.quadTo(0, 0, 1, 0);
2404 path.lineTo(0, 2);
2405 path.close();
2406 path.moveTo(0, 0);
2407 path.lineTo(0, 0);
2408 path.quadTo(1, 0, 0, 2);
2409 path.close();
2410 testSimplify(reporter, path);
2411}
2412
2413static void testQuadratic5(skiatest::Reporter* reporter) {
2414 SkPath path;
2415 path.moveTo(0, 0);
2416 path.quadTo(0, 0, 0, 0);
2417 path.lineTo(0, 1);
2418 path.close();
2419 path.moveTo(0, 0);
2420 path.lineTo(1, 0);
2421 path.quadTo(0, 1, 0, 2);
2422 path.close();
2423 testSimplify(reporter, path);
2424}
2425
2426static void testQuadratic6(skiatest::Reporter* reporter) {
2427 SkPath path;
2428 path.moveTo(0, 0);
2429 path.quadTo(0, 0, 1, 0);
2430 path.lineTo(2, 1);
2431 path.close();
2432 path.moveTo(0, 0);
2433 path.lineTo(0, 0);
2434 path.quadTo(2, 0, 0, 1);
2435 path.close();
2436 testSimplify(reporter, path);
2437}
2438
2439static void testQuadratic7(skiatest::Reporter* reporter) {
2440 SkPath path;
2441 path.moveTo(0, 0);
2442 path.quadTo(0, 0, 1, 0);
2443 path.lineTo(3, 1);
2444 path.close();
2445 path.moveTo(0, 0);
2446 path.lineTo(0, 0);
2447 path.quadTo(3, 0, 1, 2);
2448 path.close();
2449 testSimplify(reporter, path);
2450}
2451
2452static void testQuadratic8(skiatest::Reporter* reporter) {
2453 SkPath path;
2454 path.moveTo(0, 0);
2455 path.quadTo(0, 0, 1, 0);
2456 path.lineTo(0, 2);
2457 path.close();
2458 path.moveTo(0, 0);
2459 path.lineTo(1, 0);
2460 path.quadTo(0, 1, 1, 2);
2461 path.close();
2462 testSimplify(reporter, path);
2463}
2464
2465static void testQuadratic9(skiatest::Reporter* reporter) {
2466 SkPath path;
2467 path.moveTo(0, 0);
2468 path.quadTo(0, 0, 1, 0);
2469 path.lineTo(3, 1);
2470 path.close();
2471 path.moveTo(0, 0);
2472 path.lineTo(1, 0);
2473 path.quadTo(1, 2, 3, 2);
2474 path.close();
2475 testSimplify(reporter, path);
2476}
2477
2478static void testQuadratic14(skiatest::Reporter* reporter) {
2479 SkPath path;
2480 path.moveTo(0, 0);
2481 path.quadTo(0, 0, 1, 0);
2482 path.lineTo(3, 2);
2483 path.close();
2484 path.moveTo(0, 0);
2485 path.lineTo(1, 0);
2486 path.quadTo(3, 2, 3, 3);
2487 path.close();
2488 testSimplify(reporter, path);
2489}
2490
2491static void testQuadratic15(skiatest::Reporter* reporter) {
2492 SkPath path;
2493 path.moveTo(0, 0);
2494 path.quadTo(0, 0, 1, 0);
2495 path.lineTo(1, 3);
2496 path.close();
2497 path.moveTo(1, 0);
2498 path.lineTo(0, 1);
2499 path.quadTo(1, 1, 0, 3);
2500 path.close();
2501 testSimplify(reporter, path);
2502}
2503
2504static void testQuadratic17x(skiatest::Reporter* reporter) {
2505 SkPath path;
2506 path.setFillType(SkPath::kEvenOdd_FillType);
2507 path.moveTo(0, 0);
2508 path.quadTo(0, 0, 3, 1);
2509 path.lineTo(0, 2);
2510 path.close();
2511 path.moveTo(0, 0);
2512 path.lineTo(1, 0);
2513 path.quadTo(3, 1, 0, 2);
2514 path.close();
2515 testSimplify(reporter, path);
2516}
2517
2518static void testQuadratic18(skiatest::Reporter* reporter) {
2519 SkPath path;
2520 path.moveTo(0, 0);
2521 path.quadTo(1, 0, 0, 1);
2522 path.lineTo(0, 1);
2523 path.close();
2524 path.moveTo(0, 0);
2525 path.lineTo(0, 0);
2526 path.quadTo(1, 0, 1, 1);
2527 path.close();
2528 testSimplify(reporter, path);
2529}
2530
2531static void testQuadratic19(skiatest::Reporter* reporter) {
2532 SkPath path;
2533 path.moveTo(0, 0);
2534 path.quadTo(1, 0, 0, 1);
2535 path.lineTo(0, 1);
2536 path.close();
2537 path.moveTo(0, 0);
2538 path.lineTo(0, 0);
2539 path.quadTo(2, 0, 0, 1);
2540 path.close();
2541 testSimplify(reporter, path);
2542}
2543
2544static void testQuadratic20(skiatest::Reporter* reporter) {
2545 SkPath path;
2546 path.moveTo(0, 0);
2547 path.quadTo(1, 0, 0, 1);
2548 path.lineTo(0, 1);
2549 path.close();
2550 path.moveTo(0, 0);
2551 path.lineTo(0, 0);
2552 path.quadTo(1, 0, 0, 1);
2553 path.close();
2554 testSimplify(reporter, path);
2555}
2556
2557static void testQuadratic21(skiatest::Reporter* reporter) {
2558 SkPath path;
2559 path.moveTo(0, 0);
2560 path.quadTo(1, 0, 0, 1);
2561 path.lineTo(0, 1);
2562 path.close();
2563 path.moveTo(0, 0);
2564 path.lineTo(0, 0);
2565 path.quadTo(1, 0, 0, 2);
2566 path.close();
2567 testSimplify(reporter, path);
2568}
2569
2570static void testQuadratic22(skiatest::Reporter* reporter) {
2571 SkPath path;
2572 path.moveTo(0, 0);
2573 path.quadTo(1, 0, 0, 1);
2574 path.lineTo(0, 1);
2575 path.close();
2576 path.moveTo(0, 0);
2577 path.lineTo(0, 0);
2578 path.quadTo(0, 1, 2, 1);
2579 path.close();
2580 testSimplify(reporter, path);
2581}
2582
2583static void testQuadratic23(skiatest::Reporter* reporter) {
2584 SkPath path;
2585 path.moveTo(0, 0);
2586 path.quadTo(1, 0, 0, 1);
2587 path.lineTo(0, 1);
2588 path.close();
2589 path.moveTo(0, 0);
2590 path.lineTo(0, 0);
2591 path.quadTo(0, 2, 1, 2);
2592 path.close();
2593 testSimplify(reporter, path);
2594}
2595
2596static void testQuadratic24(skiatest::Reporter* reporter) {
2597 SkPath path;
2598 path.moveTo(0, 0);
2599 path.quadTo(1, 0, 0, 1);
2600 path.lineTo(0, 1);
2601 path.close();
2602 path.moveTo(0, 0);
2603 path.lineTo(1, 0);
2604 path.quadTo(2, 0, 0, 1);
2605 path.close();
2606 testSimplify(reporter, path);
2607}
2608
2609static void testQuadratic25(skiatest::Reporter* reporter) {
2610 SkPath path;
2611 path.moveTo(0, 0);
2612 path.quadTo(1, 0, 1, 1);
2613 path.lineTo(1, 1);
2614 path.close();
2615 path.moveTo(0, 0);
2616 path.lineTo(0, 0);
2617 path.quadTo(2, 1, 0, 2);
2618 path.close();
2619 testSimplify(reporter, path);
2620}
2621
2622static void testQuadratic26(skiatest::Reporter* reporter) {
2623 SkPath path;
2624 path.moveTo(0, 0);
2625 path.quadTo(1, 0, 1, 1);
2626 path.lineTo(0, 2);
2627 path.close();
2628 path.moveTo(0, 0);
2629 path.lineTo(0, 0);
2630 path.quadTo(1, 0, 0, 1);
2631 path.close();
2632 testSimplify(reporter, path);
2633}
2634
2635static void testQuadratic27(skiatest::Reporter* reporter) {
2636 SkPath path;
2637 path.moveTo(0, 0);
2638 path.quadTo(1, 0, 1, 1);
2639 path.lineTo(2, 1);
2640 path.close();
2641 path.moveTo(0, 0);
2642 path.lineTo(0, 0);
2643 path.quadTo(2, 1, 0, 2);
2644 path.close();
2645 testSimplify(reporter, path);
2646}
2647
2648static void testQuadratic28(skiatest::Reporter* reporter) {
2649 SkPath path;
2650 path.moveTo(0, 0);
2651 path.quadTo(1, 0, 0, 1);
2652 path.lineTo(0, 1);
2653 path.close();
2654 path.moveTo(0, 0);
2655 path.lineTo(0, 2);
2656 path.quadTo(1, 2, 0, 3);
2657 path.close();
2658 testSimplify(reporter, path);
2659}
2660
2661static void testQuadratic29(skiatest::Reporter* reporter) {
2662 SkPath path;
2663 path.moveTo(0, 0);
2664 path.quadTo(1, 0, 2, 1);
2665 path.lineTo(0, 2);
2666 path.close();
2667 path.moveTo(0, 0);
2668 path.lineTo(0, 0);
2669 path.quadTo(1, 0, 0, 1);
2670 path.close();
2671 testSimplify(reporter, path);
2672}
2673
2674static void testQuadratic30(skiatest::Reporter* reporter) {
2675 SkPath path;
2676 path.moveTo(0, 0);
2677 path.quadTo(1, 0, 1, 2);
2678 path.lineTo(1, 2);
2679 path.close();
2680 path.moveTo(0, 0);
2681 path.lineTo(1, 0);
2682 path.quadTo(0, 1, 1, 2);
2683 path.close();
2684 testSimplify(reporter, path);
2685}
2686
2687static void testQuadratic31(skiatest::Reporter* reporter) {
2688 SkPath path;
2689 path.moveTo(0, 0);
2690 path.quadTo(1, 0, 1, 2);
2691 path.lineTo(1, 2);
2692 path.close();
2693 path.moveTo(0, 0);
2694 path.lineTo(1, 0);
2695 path.quadTo(0, 1, 1, 3);
2696 path.close();
2697 testSimplify(reporter, path);
2698}
2699
2700static void testQuadratic32(skiatest::Reporter* reporter) {
2701 SkPath path;
2702 path.moveTo(0, 0);
2703 path.quadTo(1, 0, 2, 3);
2704 path.lineTo(2, 3);
2705 path.close();
2706 path.moveTo(0, 0);
2707 path.lineTo(0, 0);
2708 path.quadTo(3, 1, 0, 2);
2709 path.close();
2710 testSimplify(reporter, path);
2711}
2712
2713static void testQuadratic33(skiatest::Reporter* reporter) {
2714 SkPath path;
2715 path.moveTo(0, 0);
2716 path.quadTo(2, 0, 0, 1);
2717 path.lineTo(0, 1);
2718 path.close();
2719 path.moveTo(0, 0);
2720 path.lineTo(1, 1);
2721 path.quadTo(2, 1, 2, 2);
2722 path.close();
2723 testSimplify(reporter, path);
2724}
2725
2726static void testQuadratic34(skiatest::Reporter* reporter) {
2727 SkPath path;
2728 path.moveTo(0, 0);
2729 path.quadTo(2, 0, 0, 1);
2730 path.lineTo(0, 1);
2731 path.close();
2732 path.moveTo(1, 0);
2733 path.lineTo(1, 1);
2734 path.quadTo(2, 1, 1, 2);
2735 path.close();
2736 testSimplify(reporter, path);
2737}
2738
2739static void testQuadratic35(skiatest::Reporter* reporter) {
2740 SkPath path;
2741 path.moveTo(0, 0);
2742 path.quadTo(0, 1, 1, 1);
2743 path.lineTo(1, 3);
2744 path.close();
2745 path.moveTo(2, 0);
2746 path.lineTo(3, 0);
2747 path.quadTo(0, 1, 1, 1);
2748 path.close();
2749 testSimplify(reporter, path);
2750}
2751
2752static void testQuadratic36(skiatest::Reporter* reporter) {
2753 SkPath path;
2754 path.moveTo(0, 0);
2755 path.quadTo(2, 1, 2, 3);
2756 path.lineTo(2, 3);
2757 path.close();
2758 path.moveTo(3, 1);
2759 path.lineTo(1, 2);
2760 path.quadTo(3, 2, 1, 3);
2761 path.close();
2762 testSimplify(reporter, path);
2763}
2764
2765static void testQuadratic37(skiatest::Reporter* reporter) {
2766 SkPath path;
2767 path.moveTo(0, 0);
2768 path.quadTo(0, 2, 1, 2);
2769 path.lineTo(1, 2);
2770 path.close();
2771 path.moveTo(0, 0);
2772 path.lineTo(3, 1);
2773 path.quadTo(0, 2, 1, 2);
2774 path.close();
2775 testSimplify(reporter, path);
2776}
2777
2778static void testQuadratic38(skiatest::Reporter* reporter) {
2779 SkPath path;
2780 path.moveTo(1, 0);
2781 path.quadTo(0, 1, 1, 1);
2782 path.lineTo(1, 1);
2783 path.close();
2784 path.moveTo(1, 0);
2785 path.lineTo(1, 2);
2786 path.quadTo(2, 2, 1, 3);
2787 path.close();
2788 testSimplify(reporter, path);
2789}
2790
2791static void testQuadratic51(skiatest::Reporter* reporter) {
2792 SkPath path;
2793 path.moveTo(369.863983f, 145.645813f);
2794 path.quadTo(382.380371f, 121.254936f, 406.236359f, 121.254936f);
2795 path.lineTo(369.863983f, 145.645813f);
2796 path.close();
2797 path.moveTo(369.970581f, 137.94342f);
2798 path.quadTo(383.98465f, 121.254936f, 406.235992f, 121.254936f);
2799 path.lineTo(369.970581f, 137.94342f);
2800 path.close();
2801 testSimplify(reporter, path);
2802}
2803
2804static void testQuadratic53(skiatest::Reporter* reporter) {
2805 SkPath path;
2806 path.moveTo(303.12088f, 141.299606f);
2807 path.lineTo(330.463562f, 217.659027f);
2808 path.lineTo(303.12088f, 141.299606f);
2809 path.close();
2810 path.moveTo(371.919067f, 205.854996f);
2811 path.lineTo(326.236786f, 205.854996f);
2812 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2813 path.lineTo(371.919067f, 205.854996f);
2814 path.close();
2815 testSimplify(reporter, path);
2816}
caryclark@google.com570863f2013-09-16 15:55:01 +00002817
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002818static void testQuadratic55(skiatest::Reporter* reporter) {
2819 SkPath path;
2820path.moveTo(303.12088f, 141.299606f);
2821path.lineTo(330.463562f, 217.659027f);
2822path.lineTo(358.606506f, 141.299606f);
2823path.lineTo(303.12088f, 141.299606f);
2824path.close();
2825path.moveTo(326.236786f, 205.854996f);
2826path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2827path.lineTo(326.236786f, 205.854996f);
2828path.close();
2829 testSimplify(reporter, path);
2830}
2831
2832static void testQuadratic56(skiatest::Reporter* reporter) {
2833 SkPath path;
2834path.moveTo(366.608826f, 151.196014f);
2835path.quadTo(378.803101f, 136.674606f, 398.164948f, 136.674606f);
2836path.lineTo(354.009216f, 208.816208f);
2837path.lineTo(393.291473f, 102.232819f);
2838path.lineTo(359.978058f, 136.581512f);
2839path.quadTo(378.315979f, 136.581512f, 388.322723f, 149.613556f);
2840path.lineTo(364.390686f, 157.898193f);
2841path.quadTo(375.281769f, 136.674606f, 396.039917f, 136.674606f);
2842path.lineTo(350, 120);
2843path.lineTo(366.608826f, 151.196014f);
2844path.close();
2845 testSimplify(reporter, path);
2846}
2847
2848static void testLine80(skiatest::Reporter* reporter) {
2849 SkPath path;
2850path.moveTo(4, 0);
2851path.lineTo(3, 7);
2852path.lineTo(7, 5);
2853path.lineTo(2, 2);
2854path.close();
2855path.moveTo(0, 6);
2856path.lineTo(6, 12);
2857path.lineTo(8, 3);
2858path.close();
2859 testSimplify(reporter, path);
2860}
2861
2862static void testQuadratic58(skiatest::Reporter* reporter) {
2863 SkPath path;
caryclark@google.com07e97fc2013-07-08 17:17:02 +00002864 path.moveTo(283.714233f, 240);
2865 path.lineTo(283.714233f, 141.299606f);
2866 path.lineTo(303.12088f, 141.299606f);
2867 path.lineTo(330.463562f, 217.659027f);
2868 path.lineTo(358.606506f, 141.299606f);
2869 path.lineTo(362.874634f, 159.705902f);
2870 path.lineTo(335.665344f, 233.397751f);
2871 path.lineTo(322.12738f, 233.397751f);
2872 path.lineTo(295.718353f, 159.505829f);
2873 path.lineTo(295.718353f, 240);
2874 path.lineTo(283.714233f, 240);
2875 path.close();
2876 path.moveTo(322.935669f, 231.030273f);
2877 path.quadTo(312.832214f, 220.393295f, 312.832214f, 203.454178f);
2878 path.quadTo(312.832214f, 186.981888f, 321.73526f, 176.444946f);
2879 path.quadTo(330.638306f, 165.90802f, 344.509705f, 165.90802f);
2880 path.quadTo(357.647522f, 165.90802f, 364.81665f, 175.244537f);
2881 path.lineTo(371.919067f, 205.854996f);
2882 path.lineTo(326.236786f, 205.854996f);
2883 path.quadTo(329.104431f, 231.663818f, 351.512085f, 231.663818f);
2884 path.lineTo(322.935669f, 231.030273f);
2885 path.close();
2886 path.moveTo(326.837006f, 195.984955f);
2887 path.lineTo(358.78125f, 195.984955f);
2888 path.quadTo(358.78125f, 175.778046f, 343.709442f, 175.778046f);
2889 path.quadTo(328.570923f, 175.778046f, 326.837006f, 195.984955f);
2890 path.close();
caryclark@google.com818b0cc2013-04-08 11:50:46 +00002891 testSimplify(reporter, path);
2892}
2893
2894static void testQuadratic59x(skiatest::Reporter* reporter) {
2895 SkPath path;
2896 path.setFillType(SkPath::kEvenOdd_FillType);
2897 path.moveTo(0, 0);
2898 path.quadTo(0, 0, 0, 0);
2899 path.lineTo(2, 2);
2900 path.close();
2901 path.moveTo(0, 0);
2902 path.lineTo(2, 0);
2903 path.quadTo(3, 1, 1, 2);
2904 path.close();
2905 testSimplify(reporter, path);
2906}
2907
2908static void testQuadratic59(skiatest::Reporter* reporter) {
2909 SkPath path;
2910 path.setFillType(SkPath::kWinding_FillType);
2911 path.moveTo(0, 0);
2912 path.quadTo(0, 0, 0, 0);
2913 path.lineTo(2, 2);
2914 path.close();
2915 path.moveTo(0, 0);
2916 path.lineTo(2, 0);
2917 path.quadTo(3, 1, 1, 2);
2918 path.close();
2919 testSimplify(reporter, path);
2920}
2921
2922static void testQuadratic63(skiatest::Reporter* reporter) {
2923 SkPath path;
2924 path.moveTo(0, 0);
2925 path.quadTo(0, 0, 0, 0);
2926 path.lineTo(3, 2);
2927 path.close();
2928 path.moveTo(1, 0);
2929 path.lineTo(2, 1);
2930 path.quadTo(2, 1, 2, 2);
2931 path.close();
2932 testSimplify(reporter, path);
2933}
2934
2935static void testQuadratic64(skiatest::Reporter* reporter) {
2936 SkPath path;
2937 path.moveTo(0, 0);
2938 path.quadTo(0, 0, 0, 0);
2939 path.lineTo(2, 3);
2940 path.close();
2941 path.moveTo(1, 2);
2942 path.lineTo(2, 2);
2943 path.quadTo(0, 3, 3, 3);
2944 path.close();
2945 testSimplify(reporter, path);
2946}
2947
2948static void testQuadratic65(skiatest::Reporter* reporter) {
2949 SkPath path;
2950 path.moveTo(0, 0);
2951 path.quadTo(0, 0, 0, 0);
2952 path.lineTo(3, 2);
2953 path.close();
2954 path.moveTo(2, 1);
2955 path.lineTo(2, 2);
2956 path.quadTo(0, 3, 1, 3);
2957 path.close();
2958 testSimplify(reporter, path);
2959}
2960
2961static void testQuadratic67x(skiatest::Reporter* reporter) {
2962 SkPath path;
2963 path.setFillType(SkPath::kEvenOdd_FillType);
2964 path.moveTo(0, 0);
2965 path.quadTo(0, 0, 2, 1);
2966 path.lineTo(2, 2);
2967 path.close();
2968 path.moveTo(0, 0);
2969 path.lineTo(2, 0);
2970 path.quadTo(1, 1, 3, 2);
2971 path.close();
2972 testSimplify(reporter, path);
2973}
2974
2975static void testQuadratic68(skiatest::Reporter* reporter) {
2976 SkPath path;
2977 path.moveTo(0, 0);
2978 path.quadTo(1, 0, 0, 1);
2979 path.lineTo(1, 2);
2980 path.close();
2981 path.moveTo(0, 0);
2982 path.lineTo(0, 0);
2983 path.quadTo(0, 1, 2, 1);
2984 path.close();
2985 testSimplify(reporter, path);
2986}
2987
2988static void testQuadratic69(skiatest::Reporter* reporter) {
2989 SkPath path;
2990 path.moveTo(0, 0);
2991 path.quadTo(0, 0, 0, 1);
2992 path.lineTo(3, 2);
2993 path.close();
2994 path.moveTo(2, 0);
2995 path.lineTo(1, 1);
2996 path.quadTo(3, 2, 2, 3);
2997 path.close();
2998 testSimplify(reporter, path);
2999}
3000
3001static void testQuadratic70x(skiatest::Reporter* reporter) {
3002 SkPath path;
3003 path.setFillType(SkPath::kEvenOdd_FillType);
3004 path.moveTo(0, 0);
3005 path.quadTo(1, 0, 0, 1);
3006 path.lineTo(1, 2);
3007 path.close();
3008 path.moveTo(0, 0);
3009 path.lineTo(0, 0);
3010 path.quadTo(0, 1, 2, 1);
3011 path.close();
3012 testSimplify(reporter, path);
3013}
3014
3015static void testQuadratic71(skiatest::Reporter* reporter) {
3016 SkPath path;
3017 path.moveTo(0, 0);
3018 path.quadTo(1, 0, 1, 1);
3019 path.lineTo(3, 2);
3020 path.close();
3021 path.moveTo(0, 0);
3022 path.lineTo(0, 0);
3023 path.quadTo(1, 1, 3, 1);
3024 path.close();
3025 testSimplify(reporter, path);
3026}
3027
3028static void testQuadratic72(skiatest::Reporter* reporter) {
3029 SkPath path;
3030 path.moveTo(0, 0);
3031 path.quadTo(1, 0, 1, 2);
3032 path.lineTo(1, 2);
3033 path.close();
3034 path.moveTo(0, 0);
3035 path.lineTo(1, 0);
3036 path.quadTo(0, 1, 3, 2);
3037 path.close();
3038 testSimplify(reporter, path);
3039}
3040
3041static void testQuadratic73(skiatest::Reporter* reporter) {
3042 SkPath path;
3043 path.moveTo(0, 0);
3044 path.quadTo(1, 0, 0, 3);
3045 path.lineTo(0, 3);
3046 path.close();
3047 path.moveTo(0, 0);
3048 path.lineTo(1, 0);
3049 path.quadTo(0, 1, 1, 1);
3050 path.close();
3051 testSimplify(reporter, path);
3052}
3053
3054static void testQuadratic74(skiatest::Reporter* reporter) {
3055 SkPath path;
3056 path.moveTo(0, 0);
3057 path.quadTo(1, 0, 1, 3);
3058 path.lineTo(1, 3);
3059 path.close();
3060 path.moveTo(0, 0);
3061 path.lineTo(0, 1);
3062 path.quadTo(3, 2, 2, 3);
3063 path.close();
3064 testSimplify(reporter, path);
3065}
3066
3067static void testQuadratic75(skiatest::Reporter* reporter) {
3068 SkPath path;
3069 path.moveTo(0, 0);
3070 path.quadTo(1, 0, 1, 3);
3071 path.lineTo(2, 3);
3072 path.close();
3073 path.moveTo(0, 0);
3074 path.lineTo(0, 1);
3075 path.quadTo(3, 2, 2, 3);
3076 path.close();
3077 testSimplify(reporter, path);
3078}
3079
3080static void testQuadratic76(skiatest::Reporter* reporter) {
3081 SkPath path;
3082 path.moveTo(0, 0);
3083 path.quadTo(0, 0, 0, 0);
3084 path.lineTo(2, 3);
3085 path.close();
3086 path.moveTo(1, 0);
3087 path.lineTo(1, 2);
3088 path.quadTo(1, 2, 2, 2);
3089 path.close();
3090 testSimplify(reporter, path);
3091}
3092
3093static void testQuadratic77(skiatest::Reporter* reporter) {
3094 SkPath path;
3095 path.moveTo(0, 0);
3096 path.quadTo(1, 0, 1, 1);
3097 path.lineTo(3, 1);
3098 path.close();
3099 path.moveTo(0, 0);
3100 path.lineTo(1, 0);
3101 path.quadTo(0, 1, 3, 2);
3102 path.close();
3103 testSimplify(reporter, path);
3104}
3105
3106static void testQuadratic78(skiatest::Reporter* reporter) {
3107 SkPath path;
3108 path.moveTo(0, 0);
3109 path.quadTo(1, 0, 1, 2);
3110 path.lineTo(3, 2);
3111 path.close();
3112 path.moveTo(0, 0);
3113 path.lineTo(0, 0);
3114 path.quadTo(2, 1, 0, 2);
3115 path.close();
3116 testSimplify(reporter, path);
3117}
3118
3119static void testQuadratic79(skiatest::Reporter* reporter) {
3120 SkPath path;
3121 path.moveTo(0, 0);
3122 path.quadTo(1, 0, 1, 2);
3123 path.lineTo(3, 2);
3124 path.close();
3125 path.moveTo(0, 0);
3126 path.lineTo(1, 0);
3127 path.quadTo(0, 1, 3, 2);
3128 path.close();
3129 testSimplify(reporter, path);
3130}
3131
3132static void testEight1(skiatest::Reporter* reporter) {
3133 SkPath path;
3134 path.moveTo(0, 0);
3135 path.lineTo(2, 2);
3136 path.lineTo(0, 2);
3137 path.lineTo(2, 0);
3138 path.close();
3139 testSimplify(reporter, path);
3140}
3141
3142static void testEight2(skiatest::Reporter* reporter) {
3143 SkPath path;
3144 path.moveTo(0, 0);
3145 path.lineTo(2, 0);
3146 path.lineTo(0, 2);
3147 path.lineTo(2, 2);
3148 path.close();
3149 testSimplify(reporter, path);
3150}
3151
3152static void testEight3(skiatest::Reporter* reporter) {
3153 SkPath path;
3154 path.moveTo(0, 0);
3155 path.lineTo(0, 2);
3156 path.lineTo(2, 0);
3157 path.lineTo(2, 2);
3158 path.close();
3159 testSimplify(reporter, path);
3160}
3161
3162static void testEight4(skiatest::Reporter* reporter) {
3163 SkPath path;
3164 path.moveTo(0, 0);
3165 path.lineTo(2, 2);
3166 path.lineTo(2, 0);
3167 path.lineTo(0, 2);
3168 path.close();
3169 testSimplify(reporter, path);
3170}
3171
3172static void testEight5(skiatest::Reporter* reporter) {
3173 SkPath path;
3174 path.moveTo(1, 0);
3175 path.lineTo(1, 2);
3176 path.lineTo(0, 2);
3177 path.lineTo(2, 0);
3178 path.close();
3179 testSimplify(reporter, path);
3180}
3181
3182static void testEight6(skiatest::Reporter* reporter) {
3183 SkPath path;
3184 path.moveTo(1, 0);
3185 path.lineTo(2, 0);
3186 path.lineTo(0, 2);
3187 path.lineTo(1, 2);
3188 path.close();
3189 testSimplify(reporter, path);
3190}
3191
3192static void testEight7(skiatest::Reporter* reporter) {
3193 SkPath path;
3194 path.moveTo(0, 0);
3195 path.lineTo(0, 1);
3196 path.lineTo(2, 1);
3197 path.lineTo(2, 2);
3198 path.close();
3199 testSimplify(reporter, path);
3200}
3201
3202static void testEight8(skiatest::Reporter* reporter) {
3203 SkPath path;
3204 path.moveTo(0, 0);
3205 path.lineTo(2, 2);
3206 path.lineTo(2, 1);
3207 path.lineTo(0, 1);
3208 path.close();
3209 testSimplify(reporter, path);
3210}
3211
3212static void testEight9(skiatest::Reporter* reporter) {
3213 SkPath path;
3214 path.moveTo(1, 0);
3215 path.lineTo(1, 2);
3216 path.lineTo(2, 1);
3217 path.lineTo(0, 1);
3218 path.close();
3219 testSimplify(reporter, path);
3220}
3221
3222static void testEight10(skiatest::Reporter* reporter) {
3223 SkPath path;
3224 path.moveTo(1, 0);
3225 path.lineTo(0, 1);
3226 path.lineTo(2, 1);
3227 path.lineTo(1, 2);
3228 path.close();
3229 testSimplify(reporter, path);
3230}
3231
3232static void testQuadratic80(skiatest::Reporter* reporter) {
3233 SkPath path;
3234 path.moveTo(0, 0);
3235 path.quadTo(1, 0, 2, 3);
3236 path.lineTo(2, 3);
3237 path.close();
3238 path.moveTo(1, 0);
3239 path.lineTo(3, 0);
3240 path.quadTo(0, 1, 1, 1);
3241 path.close();
3242 testSimplify(reporter, path);
3243}
3244
3245static void testQuadratic81(skiatest::Reporter* reporter) {
3246 SkPath path;
3247 path.moveTo(0, 0);
3248 path.quadTo(2, 0, 1, 1);
3249 path.lineTo(1, 1);
3250 path.close();
3251 path.moveTo(0, 0);
3252 path.lineTo(0, 0);
3253 path.quadTo(2, 1, 0, 2);
3254 path.close();
3255 testSimplify(reporter, path);
3256}
3257
3258static void testQuadratic82(skiatest::Reporter* reporter) {
3259 SkPath path;
3260 path.moveTo(0, 0);
3261 path.quadTo(2, 0, 1, 1);
3262 path.lineTo(0, 3);
3263 path.close();
3264 path.moveTo(0, 0);
3265 path.lineTo(0, 0);
3266 path.quadTo(2, 1, 0, 2);
3267 path.close();
3268 testSimplify(reporter, path);
3269}
3270
3271static void testQuadratic83(skiatest::Reporter* reporter) {
3272 SkPath path;
3273 path.moveTo(0, 0);
3274 path.quadTo(0, 0, 2, 0);
3275 path.lineTo(2, 2);
3276 path.close();
3277 path.moveTo(0, 1);
3278 path.lineTo(0, 2);
3279 path.quadTo(2, 2, 1, 3);
3280 path.close();
3281 testSimplify(reporter, path);
3282}
3283
3284static void testQuadratic84(skiatest::Reporter* reporter) {
3285 SkPath path;
3286 path.moveTo(0, 0);
3287 path.quadTo(2, 0, 1, 1);
3288 path.lineTo(2, 1);
3289 path.close();
3290 path.moveTo(1, 0);
3291 path.lineTo(2, 0);
3292 path.quadTo(0, 1, 2, 2);
3293 path.close();
3294 testSimplify(reporter, path);
3295}
3296
3297static void testQuadratic85(skiatest::Reporter* reporter) {
3298 SkPath path;
3299 path.moveTo(0, 0);
3300 path.quadTo(3, 0, 1, 1);
3301 path.lineTo(1, 1);
3302 path.close();
3303 path.moveTo(1, 0);
3304 path.lineTo(3, 0);
3305 path.quadTo(0, 1, 1, 2);
3306 path.close();
3307 testSimplify(reporter, path);
3308}
3309
3310static void testQuadratic86(skiatest::Reporter* reporter) {
3311 SkPath path;
3312 path.moveTo(0, 0);
3313 path.quadTo(0, 1, 1, 1);
3314 path.lineTo(2, 3);
3315 path.close();
3316 path.moveTo(0, 0);
3317 path.lineTo(0, 0);
3318 path.quadTo(1, 1, 1, 3);
3319 path.close();
3320 testSimplify(reporter, path);
3321}
3322
3323static void testQuadratic87(skiatest::Reporter* reporter) {
3324 SkPath path;
3325 path.moveTo(0, 0);
3326 path.quadTo(2, 1, 0, 2);
3327 path.lineTo(2, 3);
3328 path.close();
3329 path.moveTo(0, 0);
3330 path.lineTo(1, 1);
3331 path.quadTo(0, 2, 3, 2);
3332 path.close();
3333 testSimplify(reporter, path);
3334}
3335
3336static void testQuadratic88(skiatest::Reporter* reporter) {
3337 SkPath path;
3338 path.moveTo(0, 0);
3339 path.quadTo(2, 1, 0, 2);
3340 path.lineTo(2, 2);
3341 path.close();
3342 path.moveTo(1, 0);
3343 path.lineTo(1, 1);
3344 path.quadTo(0, 2, 2, 2);
3345 path.close();
3346 testSimplify(reporter, path);
3347}
3348
3349static void testQuadratic89x(skiatest::Reporter* reporter) {
3350 SkPath path;
3351 path.setFillType(SkPath::kEvenOdd_FillType);
3352 path.moveTo(0, 0);
3353 path.quadTo(3, 1, 2, 2);
3354 path.lineTo(0, 3);
3355 path.close();
3356 path.moveTo(0, 0);
3357 path.lineTo(2, 1);
3358 path.quadTo(3, 1, 3, 3);
3359 path.close();
3360 testSimplify(reporter, path);
3361}
3362
3363static void testQuadratic90x(skiatest::Reporter* reporter) {
3364 SkPath path;
3365 path.setFillType(SkPath::kEvenOdd_FillType);
3366 path.moveTo(0, 0);
3367 path.quadTo(3, 0, 2, 2);
3368 path.lineTo(1, 3);
3369 path.close();
3370 path.moveTo(0, 0);
3371 path.lineTo(0, 1);
3372 path.quadTo(3, 2, 2, 3);
3373 path.close();
3374 testSimplify(reporter, path);
3375}
3376
3377static void testQuadratic91(skiatest::Reporter* reporter) {
3378 SkPath path;
3379 path.moveTo(0, 0);
3380 path.quadTo(3, 2, 2, 3);
3381 path.lineTo(2, 3);
3382 path.close();
3383 path.moveTo(0, 0);
3384 path.lineTo(1, 1);
3385 path.quadTo(2, 1, 2, 3);
3386 path.close();
3387 testSimplify(reporter, path);
3388}
3389
3390static void testQuadratic92x(skiatest::Reporter* reporter) {
3391 SkPath path;
3392 path.setFillType(SkPath::kEvenOdd_FillType);
3393 path.moveTo(1, 0);
3394 path.quadTo(3, 0, 2, 2);
3395 path.lineTo(2, 2);
3396 path.close();
3397 path.moveTo(2, 0);
3398 path.lineTo(0, 1);
3399 path.quadTo(3, 2, 2, 3);
3400 path.close();
3401 testSimplify(reporter, path);
3402}
3403
3404static void testLine82(skiatest::Reporter* reporter) {
3405 SkPath path;
3406 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
3407 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
3408 path.addRect(24, 32, 33, 36, SkPath::kCCW_Direction);
3409 testSimplify(reporter, path);
3410}
3411
3412static void testLine82a(skiatest::Reporter* reporter) {
3413 SkPath path;
3414 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3415 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3416 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3417 testSimplify(reporter, path);
3418}
3419
3420static void testLine82b(skiatest::Reporter* reporter) {
3421 SkPath path;
3422 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3423 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3424 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3425 testSimplify(reporter, path);
3426}
3427
3428static void testLine82c(skiatest::Reporter* reporter) {
3429 SkPath path;
3430 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3431 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3432 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3433 testSimplify(reporter, path);
3434}
3435
3436static void testLine82d(skiatest::Reporter* reporter) {
3437 SkPath path;
3438 path.addRect(0, 0, 6, 10, SkPath::kCW_Direction);
3439 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3440 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3441 testSimplify(reporter, path);
3442}
3443
3444static void testLine82e(skiatest::Reporter* reporter) {
3445 SkPath path;
3446 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3447 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3448 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3449 testSimplify(reporter, path);
3450}
3451
3452static void testLine82f(skiatest::Reporter* reporter) {
3453 SkPath path;
3454 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3455 path.addRect(2, 2, 4, 4, SkPath::kCW_Direction);
3456 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3457 testSimplify(reporter, path);
3458}
3459
3460static void testLine82g(skiatest::Reporter* reporter) {
3461 SkPath path;
3462 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3463 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3464 path.addRect(2, 6, 4, 8, SkPath::kCW_Direction);
3465 testSimplify(reporter, path);
3466}
3467
3468static void testLine82h(skiatest::Reporter* reporter) {
3469 SkPath path;
3470 path.addRect(0, 0, 6, 10, SkPath::kCCW_Direction);
3471 path.addRect(2, 2, 4, 4, SkPath::kCCW_Direction);
3472 path.addRect(2, 6, 4, 8, SkPath::kCCW_Direction);
3473 testSimplify(reporter, path);
3474}
3475
3476static void testLine83(skiatest::Reporter* reporter) {
3477 SkPath path;
3478path.addRect(10, 30, 30, 40, SkPath::kCCW_Direction);
3479path.addRect(0, 12, 12, 18, SkPath::kCCW_Direction);
3480path.addRect(4, 13, 13, 16, SkPath::kCCW_Direction);
3481 testSimplify(reporter, path);
3482}
3483
3484static void testLine84(skiatest::Reporter* reporter) {
3485 SkPath path;
3486 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
3487 path.addRect(10, 20, 40, 30, SkPath::kCW_Direction);
3488 path.addRect(0, 12, 12, 12, SkPath::kCW_Direction);
3489 path.addRect(4, 12, 13, 13, SkPath::kCW_Direction);
3490 testSimplify(reporter, path);
3491}
3492
3493static void testLine84x(skiatest::Reporter* reporter) {
3494 SkPath path;
3495 path.setFillType(SkPath::kEvenOdd_FillType);
3496 path.addRect(0, 12, 60, 30, SkPath::kCCW_Direction);
3497 path.addRect(10, 20, 40, 30, SkPath::kCCW_Direction);
3498 path.addRect(0, 12, 12, 12, SkPath::kCCW_Direction);
3499 path.addRect(4, 12, 13, 13, SkPath::kCCW_Direction);
3500 testSimplify(reporter, path);
3501}
3502
3503static void testLine85(skiatest::Reporter* reporter) {
3504 SkPath path;
3505 path.addRect(36, 0, 66, 60, SkPath::kCCW_Direction);
3506 path.addRect(20, 0, 40, 40, SkPath::kCCW_Direction);
3507 path.addRect(12, 0, 24, 24, SkPath::kCCW_Direction);
3508 path.addRect(32, 0, 36, 41, SkPath::kCCW_Direction);
3509 testSimplify(reporter, path);
3510}
3511
3512static void testQuadralateral1(skiatest::Reporter* reporter) {
3513 SkPath path;
3514 path.moveTo(0, 0);
3515 path.lineTo(0, 0);
3516 path.lineTo(0, 0);
3517 path.lineTo(3, 2);
3518 path.close();
3519 path.moveTo(0, 0);
3520 path.lineTo(2, 1);
3521 path.lineTo(2, 2);
3522 path.lineTo(2, 3);
3523 path.close();
3524 testSimplify(reporter, path);
3525}
3526
3527static void testCubic1(skiatest::Reporter* reporter) {
3528 SkPath path;
3529 path.moveTo(0, 0);
3530 path.cubicTo(0, 1, 1, 1, 1, 0);
3531 path.close();
3532 path.moveTo(1, 0);
3533 path.cubicTo(0, 0, 0, 1, 1, 1);
3534 path.close();
3535 testSimplify(reporter, path);
3536}
3537
3538static void testQuadratic93(skiatest::Reporter* reporter) {
3539 SkPath path;
3540 path.moveTo(3, 0);
3541 path.quadTo(0, 1, 3, 2);
3542 path.lineTo(0, 3);
3543 path.close();
3544 path.moveTo(1, 0);
3545 path.lineTo(2, 0);
3546 path.quadTo(1, 1, 2, 2);
3547 path.close();
3548 testSimplify(reporter, path);
3549}
3550
3551static void testCubic2(skiatest::Reporter* reporter) {
3552 SkPath path;
3553 path.moveTo(0,2);
3554 path.cubicTo(0,3, 2,1, 4,0);
3555 path.close();
3556 path.moveTo(1,2);
3557 path.cubicTo(0,4, 2,0, 3,0);
3558 path.close();
3559 testSimplify(reporter, path);
3560}
3561
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003562static void testQuad1(skiatest::Reporter* reporter) {
3563 SkPath path;
3564 path.moveTo(0,0);
3565 path.quadTo(0,0, 0,1);
3566 path.lineTo(1,1);
3567 path.close();
3568 path.moveTo(0,0);
3569 path.quadTo(1,1, 0,2);
3570 path.close();
3571 testSimplify(reporter, path);
3572}
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003573
caryclark@google.come942bc32013-04-10 18:53:01 +00003574static void testQuadralateral2(skiatest::Reporter* reporter) {
3575 SkPath path;
3576 path.moveTo(0, 0);
3577 path.lineTo(2, 2);
3578 path.lineTo(0, 3);
3579 path.lineTo(3, 3);
3580 path.close();
3581 path.moveTo(2, 0);
3582 path.lineTo(3, 0);
3583 path.lineTo(0, 1);
3584 path.lineTo(1, 2);
3585 path.close();
3586 testSimplify(reporter, path);
3587}
3588
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003589static void testQuadratic94(skiatest::Reporter* reporter) {
3590 SkPath path;
3591 path.moveTo(0, 0);
3592 path.lineTo(8, 8);
3593 path.quadTo(8, 4, 4, 4);
3594 path.quadTo(4, 0, 0, 0);
3595 path.close();
3596 testSimplify(reporter, path);
3597}
3598
3599static void testQuadratic95(skiatest::Reporter* reporter) {
3600 SkPath path;
3601 path.moveTo(8, 8);
3602 path.lineTo(0, 0);
3603 path.quadTo(4, 0, 4, 4);
3604 path.quadTo(8, 4, 8, 8);
3605 path.close();
3606 testSimplify(reporter, path);
3607}
3608
3609static void testQuadratic96(skiatest::Reporter* reporter) {
3610 SkPath path;
3611 path.moveTo(8, 0);
3612 path.lineTo(0, 8);
3613 path.quadTo(0, 4, 4, 4);
3614 path.quadTo(4, 0, 8, 0);
3615 path.close();
3616 testSimplify(reporter, path);
3617}
3618
3619static void testQuadratic97(skiatest::Reporter* reporter) {
3620 SkPath path;
3621 path.moveTo(0, 8);
3622 path.lineTo(8, 0);
3623 path.quadTo(4, 0, 4, 4);
3624 path.quadTo(0, 4, 0, 8);
3625 path.close();
3626 testSimplify(reporter, path);
3627}
3628
caryclark@google.com03610322013-04-18 15:58:21 +00003629static void testTriangles1(skiatest::Reporter* reporter) {
3630 SkPath path;
3631 path.moveTo(0, 0);
3632 path.lineTo(1, 0);
3633 path.lineTo(3, 3);
3634 path.close();
3635 path.moveTo(0, 0);
3636 path.lineTo(1, 2);
3637 path.lineTo(1, 1);
3638 path.close();
3639 testSimplify(reporter, path);
3640}
3641
3642static void testTriangles2(skiatest::Reporter* reporter) {
3643 SkPath path;
3644 path.moveTo(0, 0);
3645 path.lineTo(1, 0);
3646 path.lineTo(3, 3);
3647 path.close();
3648 path.moveTo(1, 1);
3649 path.lineTo(2, 3);
3650 path.lineTo(1, 2);
3651 path.close();
3652 testSimplify(reporter, path);
3653}
3654
caryclark@google.com66560ca2013-04-26 19:51:16 +00003655// A test this for this case:
3656// contourA has two segments that are coincident
3657// contourB has two segments that are coincident in the same place
3658// each ends up with +2/0 pairs for winding count
3659// since logic in OpSegment::addTCoincident doesn't transfer count (only increments/decrements)
3660// can this be resolved to +4/0 ?
3661static void testAddTCoincident1(skiatest::Reporter* reporter) {
3662 SkPath path;
3663 path.moveTo(2, 0);
3664 path.lineTo(2, 2);
3665 path.lineTo(1, 1);
3666 path.lineTo(2, 0);
3667 path.lineTo(2, 2);
3668 path.lineTo(1, 1);
3669 path.close();
3670 path.moveTo(2, 0);
3671 path.lineTo(2, 2);
3672 path.lineTo(3, 1);
3673 path.lineTo(2, 0);
3674 path.lineTo(2, 2);
3675 path.lineTo(3, 1);
3676 path.close();
3677 testSimplify(reporter, path);
3678}
3679
3680// test with implicit close
3681static void testAddTCoincident2(skiatest::Reporter* reporter) {
3682 SkPath path;
3683 path.moveTo(2, 0);
3684 path.lineTo(2, 2);
3685 path.lineTo(1, 1);
3686 path.lineTo(2, 0);
3687 path.lineTo(2, 2);
3688 path.lineTo(1, 1);
3689 path.moveTo(2, 0);
3690 path.lineTo(2, 2);
3691 path.lineTo(3, 1);
3692 path.lineTo(2, 0);
3693 path.lineTo(2, 2);
3694 path.lineTo(3, 1);
3695 testSimplify(reporter, path);
3696}
3697
caryclark@google.coma5e55922013-05-07 18:51:31 +00003698static void testQuad2(skiatest::Reporter* reporter) {
3699 SkPath path;
3700 path.moveTo(1, 0);
3701 path.quadTo(0, 1, 3, 2);
3702 path.lineTo(2, 3);
3703 path.close();
3704 path.moveTo(0, 0);
3705 path.lineTo(1, 0);
3706 path.quadTo(0, 1, 1, 1);
3707 path.close();
3708}
3709
3710static void testQuad3(skiatest::Reporter* reporter) {
3711 SkPath path;
3712 path.moveTo(1, 0);
3713 path.quadTo(0, 1, 3, 2);
3714 path.lineTo(3, 3);
3715 path.close();
3716 path.moveTo(0, 0);
3717 path.lineTo(1, 0);
3718 path.quadTo(0, 1, 1, 1);
3719 path.close();
3720 testSimplify(reporter, path);
3721}
3722
3723static void testQuad4(skiatest::Reporter* reporter) {
3724 SkPath path;
3725 path.moveTo(2, 0);
3726 path.quadTo(0, 1, 1, 1);
3727 path.lineTo(3, 3);
3728 path.close();
3729 path.moveTo(0, 0);
3730 path.lineTo(2, 0);
3731 path.quadTo(0, 1, 2, 2);
3732 path.close();
3733 testSimplify(reporter, path);
3734}
3735
3736static void testQuad5(skiatest::Reporter* reporter) {
3737 SkPath path;
3738 path.moveTo(2, 0);
3739 path.quadTo(0, 1, 2, 2);
3740 path.lineTo(1, 3);
3741 path.close();
3742 path.moveTo(0, 0);
3743 path.lineTo(2, 0);
3744 path.quadTo(0, 1, 1, 1);
3745 path.close();
3746 testSimplify(reporter, path);
3747}
3748
3749static void testQuad6(skiatest::Reporter* reporter) {
3750 SkPath path;
3751 path.moveTo(2, 0);
3752 path.quadTo(0, 1, 2, 2);
3753 path.lineTo(1, 3);
3754 path.close();
3755 path.moveTo(1, 0);
3756 path.lineTo(2, 0);
3757 path.quadTo(0, 1, 1, 1);
3758 path.close();
3759 testSimplify(reporter, path);
3760}
3761
3762static void testQuad7(skiatest::Reporter* reporter) {
3763 SkPath path;
3764 path.moveTo(3, 0);
3765 path.quadTo(0, 1, 1, 1);
3766 path.lineTo(1, 3);
3767 path.close();
3768 path.moveTo(1, 0);
3769 path.lineTo(3, 0);
3770 path.quadTo(0, 1, 1, 2);
3771 path.close();
3772 testSimplify(reporter, path);
3773}
3774
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003775static void testQuadLineIntersect1(skiatest::Reporter* reporter) {
3776 SkPath path;
3777 path.moveTo(0, 0);
3778 path.quadTo(3, 1, 0, 3);
3779 path.lineTo(2, 3);
3780 path.close();
3781 path.moveTo(2, 0);
3782 path.lineTo(0, 1);
3783 path.quadTo(3, 1, 0, 2);
3784 path.close();
3785 testSimplify(reporter, path);
3786}
3787
3788static void testQuadLineIntersect2(skiatest::Reporter* reporter) {
3789 SkPath path;
3790 path.moveTo(0, 0);
3791 path.quadTo(3, 1, 0, 3);
3792 path.lineTo(0, 3);
3793 path.close();
3794 path.moveTo(2, 0);
3795 path.lineTo(0, 1);
3796 path.quadTo(3, 1, 0, 2);
3797 path.close();
3798 testSimplify(reporter, path);
3799}
3800
3801static void testQuadLineIntersect3(skiatest::Reporter* reporter) {
3802 SkPath path;
3803 path.moveTo(0, 0);
3804 path.quadTo(3, 1, 0, 3);
3805 path.lineTo(1, 3);
3806 path.close();
3807 path.moveTo(2, 0);
3808 path.lineTo(0, 1);
3809 path.quadTo(3, 1, 0, 2);
3810 path.close();
3811 testSimplify(reporter, path);
3812}
3813
caryclark@google.com07e97fc2013-07-08 17:17:02 +00003814static void skphealth_com76(skiatest::Reporter* reporter) {
3815 SkPath path;
3816 path.setFillType(SkPath::kWinding_FillType);
3817 path.moveTo(708.099182f, 7.09919119f);
3818 path.lineTo(708.099182f, 7.09920025f);
3819 path.quadTo(704.000000f, 11.2010098f, 704.000000f, 17.0000000f);
3820 path.lineTo(704.000000f, 33.0000000f);
3821 path.lineTo(705.000000f, 33.0000000f);
3822 path.lineTo(705.000000f, 17.0000000f);
3823 path.cubicTo(705.000000f, 13.4101496f, 706.455078f, 10.1601505f, 708.807617f, 7.80761385f);
3824 path.lineTo(708.099182f, 7.09919119f);
3825 path.close();
3826 path.moveTo(704.000000f, 3.00000000f);
3827 path.lineTo(704.000000f, 33.0000000f);
3828 path.lineTo(705.000000f, 33.0000000f);
3829 path.lineTo(719.500000f, 3.00000000f);
3830 testSimplify(reporter, path);
3831}
3832
caryclark@google.com570863f2013-09-16 15:55:01 +00003833static void tooCloseTest(skiatest::Reporter* reporter) {
3834 SkPath path;
3835 path.moveTo(0, 0);
3836 path.lineTo(1, 1);
3837 path.lineTo(1,-1);
3838 path.close();
3839 path.moveTo(0, 0);
3840 path.lineTo(1,-2);
3841 path.lineTo(1, 2);
3842 path.lineTo(2, 0);
3843 path.close();
3844 testSimplify(reporter, path);
3845}
3846
3847static void testRect1(skiatest::Reporter* reporter) {
3848 SkPath path;
3849 path.addRect(0, 0, 60, 60, SkPath::kCCW_Direction);
3850 path.addRect(30, 20, 50, 50, SkPath::kCCW_Direction);
3851 path.addRect(24, 20, 36, 30, SkPath::kCCW_Direction);
3852 path.addRect(32, 24, 36, 41, SkPath::kCCW_Direction);
3853 testSimplify(reporter, path);
3854}
3855
3856static void testRect2(skiatest::Reporter* reporter) {
3857 SkPath path;
3858 path.setFillType(SkPath::kWinding_FillType);
3859 path.moveTo(0, 0);
3860 path.lineTo(60, 0);
3861 path.lineTo(60, 60);
3862 path.lineTo(0, 60);
3863 path.close();
3864 path.moveTo(30, 20);
3865 path.lineTo(30, 50);
3866 path.lineTo(50, 50);
3867 path.lineTo(50, 20);
3868 path.close();
3869 path.moveTo(24, 20);
3870 path.lineTo(24, 30);
3871 path.lineTo(36, 30);
3872 path.lineTo(36, 20);
3873 path.close();
3874 path.moveTo(32, 24);
3875 path.lineTo(32, 41);
3876 path.lineTo(36, 41);
3877 path.lineTo(36, 24);
3878 path.close();
3879 testSimplify(reporter, path);
3880}
3881
3882static void testTriangles3x(skiatest::Reporter* reporter) {
3883 SkPath path;
3884 path.setFillType(SkPath::kEvenOdd_FillType);
3885 path.moveTo(1, 0);
3886 path.quadTo(0, 1, 3, 2);
3887 path.lineTo(1, 3);
3888 path.close();
3889 path.moveTo(0, 0);
3890 path.lineTo(1, 1);
3891 path.quadTo(2, 1, 0, 2);
3892 path.close();
3893 testSimplify(reporter, path);
3894}
3895
3896static void testQuad8(skiatest::Reporter* reporter) {
3897 SkPath path;
3898 path.moveTo(3, 0);
3899 path.quadTo(0, 1, 3, 2);
3900 path.lineTo(0, 3);
3901 path.close();
3902 path.moveTo(1, 0);
3903 path.lineTo(3, 0);
3904 path.quadTo(1, 1, 2, 2);
3905 path.close();
3906 testSimplify(reporter, path);
3907}
3908
skia.committer@gmail.comb0a05892013-10-03 07:01:37 +00003909static void testTriangles4x(skiatest::Reporter* reporter) {
3910 SkPath path;
3911 path.setFillType(SkPath::kEvenOdd_FillType);
3912 path.moveTo(0, 0);
3913 path.quadTo(2, 0, 0, 3);
3914 path.lineTo(2, 3);
3915 path.close();
3916 path.moveTo(0, 0);
3917 path.lineTo(0, 1);
3918 path.quadTo(3, 2, 2, 3);
3919 path.close();
caryclark@google.com7eaa53d2013-10-02 14:49:34 +00003920 testSimplify(reporter, path);
3921}
3922
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00003923static void testQuad9(skiatest::Reporter* reporter) {
3924 SkPath path;
3925 path.setFillType(SkPath::kEvenOdd_FillType);
3926 path.moveTo(1, 0);
3927 path.quadTo(0, 1, 3, 2);
3928 path.lineTo(1, 3);
3929 path.close();
3930 path.moveTo(1, 0);
3931 path.lineTo(1, 1);
3932 path.quadTo(2, 1, 1, 3);
3933 path.close();
3934 testSimplify(reporter, path);
3935}
3936
3937static void testQuad10(skiatest::Reporter* reporter) {
3938 SkPath path;
3939 path.moveTo(1, 0);
3940 path.quadTo(0, 1, 3, 2);
3941 path.lineTo(3, 3);
3942 path.close();
3943 path.moveTo(1, 0);
3944 path.lineTo(2, 0);
3945 path.quadTo(2, 3, 3, 3);
3946 path.close();
3947 testSimplify(reporter, path);
3948}
3949
caryclark@google.com28d219c2013-11-25 13:39:12 +00003950static void testQuad11(skiatest::Reporter* reporter) {
3951 SkPath path;
skia.committer@gmail.comec18ce72013-11-26 07:02:21 +00003952 path.moveTo(2, 0);
3953 path.quadTo(0, 1, 1, 2);
3954 path.lineTo(1, 2);
3955 path.close();
3956 path.moveTo(0, 0);
3957 path.lineTo(1, 1);
3958 path.quadTo(1, 3, 3, 3);
3959 path.close();
caryclark@google.com28d219c2013-11-25 13:39:12 +00003960 testSimplify(reporter, path);
skia.committer@gmail.comec18ce72013-11-26 07:02:21 +00003961}
caryclark@google.com28d219c2013-11-25 13:39:12 +00003962
caryclark@google.com7eaa53d2013-10-02 14:49:34 +00003963static void (*firstTest)(skiatest::Reporter* ) = 0;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003964
3965static TestDesc tests[] = {
caryclark@google.com28d219c2013-11-25 13:39:12 +00003966 TEST(testQuad11),
commit-bot@chromium.org866f4e32013-11-21 17:04:29 +00003967 TEST(testQuad10),
3968 TEST(testQuad9),
caryclark@google.com7eaa53d2013-10-02 14:49:34 +00003969 TEST(testTriangles4x),
caryclark@google.com570863f2013-09-16 15:55:01 +00003970 TEST(testQuad8),
3971 TEST(testTriangles3x),
3972 TEST(testRect2),
3973 TEST(testRect1),
3974 TEST(tooCloseTest),
caryclark@google.com07e97fc2013-07-08 17:17:02 +00003975 TEST(skphealth_com76),
caryclark@google.comcffbcc32013-06-04 17:59:42 +00003976 TEST(testQuadLineIntersect1),
3977 TEST(testQuadLineIntersect2),
3978 TEST(testQuadLineIntersect3),
caryclark@google.coma5e55922013-05-07 18:51:31 +00003979 TEST(testQuad7),
3980 TEST(testQuad6),
3981 TEST(testQuad5),
3982 TEST(testQuad4),
3983 TEST(testQuad3),
3984 TEST(testQuad2),
caryclark@google.com66560ca2013-04-26 19:51:16 +00003985 TEST(testAddTCoincident2),
3986 TEST(testAddTCoincident1),
caryclark@google.com03610322013-04-18 15:58:21 +00003987 TEST(testTriangles2),
3988 TEST(testTriangles1),
caryclark@google.comad65a3e2013-04-15 19:13:59 +00003989 TEST(testQuadratic97),
3990 TEST(testQuadratic96),
3991 TEST(testQuadratic95),
3992 TEST(testQuadratic94),
caryclark@google.come942bc32013-04-10 18:53:01 +00003993 TEST(testQuadralateral2),
caryclark@google.coma5e55922013-05-07 18:51:31 +00003994 TEST(testQuad1),
caryclark@google.com818b0cc2013-04-08 11:50:46 +00003995 TEST(testCubic2),
3996 TEST(testCubic1),
3997 TEST(testQuadralateral1),
3998 TEST(testLine85),
3999 TEST(testLine84),
4000 TEST(testLine84x),
4001 TEST(testLine83),
4002 TEST(testLine82h),
4003 TEST(testLine82g),
4004 TEST(testLine82f),
4005 TEST(testLine82e),
4006 TEST(testLine82d),
4007 TEST(testLine82c),
4008 TEST(testLine82b),
4009 TEST(testLine82a),
4010 TEST(testLine82),
4011 TEST(testQuadratic93),
4012 TEST(testQuadratic92x),
4013 TEST(testQuadratic91),
4014 TEST(testQuadratic90x),
4015 TEST(testQuadratic89x),
4016 TEST(testQuadratic88),
4017 TEST(testQuadratic87),
4018 TEST(testQuadratic86),
4019 TEST(testQuadratic85),
4020 TEST(testQuadratic84),
4021 TEST(testQuadratic83),
4022 TEST(testQuadratic82),
4023 TEST(testQuadratic81),
4024 TEST(testQuadratic80),
4025 TEST(testEight1),
4026 TEST(testEight2),
4027 TEST(testEight3),
4028 TEST(testEight4),
4029 TEST(testEight5),
4030 TEST(testEight6),
4031 TEST(testEight7),
4032 TEST(testEight8),
4033 TEST(testEight9),
4034 TEST(testEight10),
4035 TEST(testQuadratic79),
4036 TEST(testQuadratic78),
4037 TEST(testQuadratic77),
4038 TEST(testQuadratic76),
4039 TEST(testQuadratic75),
4040 TEST(testQuadratic74),
4041 TEST(testQuadratic73),
4042 TEST(testQuadratic72),
4043 TEST(testQuadratic71),
4044 TEST(testQuadratic70x),
4045 TEST(testQuadratic69),
4046 TEST(testQuadratic68),
4047 TEST(testQuadratic67x),
4048 TEST(testQuadratic65),
4049 TEST(testQuadratic64),
4050 TEST(testQuadratic63),
4051 TEST(testLine1a),
4052 TEST(testLine1ax),
4053 TEST(testQuadratic59),
4054 TEST(testQuadratic59x),
4055 TEST(testQuadratic58),
4056 TEST(testQuadratic56),
4057 TEST(testQuadratic55),
4058 TEST(testQuadratic53),
4059 TEST(testQuadratic51),
4060 TEST(testQuadratic38),
4061 TEST(testQuadratic37),
4062 TEST(testQuadratic36),
4063 TEST(testQuadratic35),
4064 TEST(testQuadratic34),
4065 TEST(testQuadratic33),
4066 TEST(testQuadratic32),
4067 TEST(testQuadratic31),
4068 TEST(testQuadratic30),
4069 TEST(testQuadratic29),
4070 TEST(testQuadratic28),
4071 TEST(testQuadratic27),
4072 TEST(testQuadratic26),
4073 TEST(testQuadratic25),
4074 TEST(testQuadratic24),
4075 TEST(testQuadratic23),
4076 TEST(testQuadratic22),
4077 TEST(testQuadratic21),
4078 TEST(testQuadratic20),
4079 TEST(testQuadratic19),
4080 TEST(testQuadratic18),
4081 TEST(testQuadratic17x),
4082 TEST(testQuadratic15),
4083 TEST(testQuadratic14),
4084 TEST(testQuadratic9),
4085 TEST(testQuadratic8),
4086 TEST(testQuadratic7),
4087 TEST(testQuadratic6),
4088 TEST(testQuadratic5),
4089 TEST(testQuadratic4x),
4090 TEST(testQuadratic3x),
4091 TEST(testQuadratic2x),
4092 TEST(testQuadratic1x),
4093 TEST(testQuadratic4),
4094 TEST(testQuadratic3),
4095 TEST(testQuadratic2),
4096 TEST(testQuadratic1),
4097 TEST(testLine4ax),
4098 TEST(testLine3aax),
4099 TEST(testLine2ax),
4100 TEST(testLine1ax),
4101 TEST(testQuadralateral9x),
4102 TEST(testQuadralateral8x),
4103 TEST(testQuadralateral7x),
4104 TEST(testQuadralateral6x),
4105 TEST(testQuadralateral6ax),
4106 TEST(testQuadralateral9),
4107 TEST(testQuadralateral8),
4108 TEST(testQuadralateral7),
4109 TEST(testQuadralateral6),
4110 TEST(testQuadralateral6a),
4111 TEST(testFauxQuadralateral6dx),
4112 TEST(testFauxQuadralateral6cx),
4113 TEST(testFauxQuadralateral6bx),
4114 TEST(testFauxQuadralateral6ax),
4115 TEST(testFauxQuadralateral6x),
4116 TEST(testFauxQuadralateral6d),
4117 TEST(testFauxQuadralateral6c),
4118 TEST(testFauxQuadralateral6b),
4119 TEST(testFauxQuadralateral6a),
4120 TEST(testFauxQuadralateral6),
4121 TEST(testQuadralateral5x),
4122 TEST(testQuadralateral5),
4123 TEST(testNondegenerate4x),
4124 TEST(testNondegenerate3x),
4125 TEST(testNondegenerate2x),
4126 TEST(testNondegenerate1x),
4127 TEST(testNondegenerate4),
4128 TEST(testNondegenerate3),
4129 TEST(testNondegenerate2),
4130 TEST(testNondegenerate1),
4131 TEST(testDegenerate4x),
4132 TEST(testDegenerate3x),
4133 TEST(testDegenerate2x),
4134 TEST(testDegenerate1x),
4135 TEST(testDegenerate4),
4136 TEST(testDegenerate3),
4137 TEST(testDegenerate2),
4138 TEST(testDegenerate1),
4139 TEST(testLine79x),
4140 TEST(testLine78x),
4141 TEST(testLine77x),
4142 TEST(testLine76x),
4143 TEST(testLine75x),
4144 TEST(testLine74x),
4145 TEST(testLine73x),
4146 TEST(testLine72x),
4147 TEST(testLine71x),
4148 TEST(testLine70x),
4149 TEST(testLine69x),
4150 TEST(testLine68hx),
4151 TEST(testLine68gx),
4152 TEST(testLine68fx),
4153 TEST(testLine68ex),
4154 TEST(testLine68dx),
4155 TEST(testLine68cx),
4156 TEST(testLine68bx),
4157 TEST(testLine68ax),
4158 TEST(testLine67x),
4159 TEST(testLine66x),
4160 TEST(testLine65x),
4161 TEST(testLine64x),
4162 TEST(testLine63x),
4163 TEST(testLine62x),
4164 TEST(testLine61x),
4165 TEST(testLine60x),
4166 TEST(testLine59x),
4167 TEST(testLine58x),
4168 TEST(testLine57x),
4169 TEST(testLine56x),
4170 TEST(testLine55x),
4171 TEST(testLine54x),
4172 TEST(testLine53x),
4173 TEST(testLine52x),
4174 TEST(testLine51x),
4175 TEST(testLine50x),
4176 TEST(testLine49x),
4177 TEST(testLine48x),
4178 TEST(testLine47x),
4179 TEST(testLine46x),
4180 TEST(testLine45x),
4181 TEST(testLine44x),
4182 TEST(testLine43x),
4183 TEST(testLine42x),
4184 TEST(testLine41x),
4185 TEST(testLine40x),
4186 TEST(testLine38x),
4187 TEST(testLine37x),
4188 TEST(testLine36x),
4189 TEST(testLine35x),
4190 TEST(testLine34x),
4191 TEST(testLine33x),
4192 TEST(testLine32x),
4193 TEST(testLine31x),
4194 TEST(testLine30x),
4195 TEST(testLine29x),
4196 TEST(testLine28x),
4197 TEST(testLine27x),
4198 TEST(testLine26x),
4199 TEST(testLine25x),
4200 TEST(testLine24ax),
4201 TEST(testLine24x),
4202 TEST(testLine23x),
4203 TEST(testLine22x),
4204 TEST(testLine21x),
4205 TEST(testLine20x),
4206 TEST(testLine19x),
4207 TEST(testLine18x),
4208 TEST(testLine17x),
4209 TEST(testLine16x),
4210 TEST(testLine15x),
4211 TEST(testLine14x),
4212 TEST(testLine13x),
4213 TEST(testLine12x),
4214 TEST(testLine11x),
4215 TEST(testLine10ax),
4216 TEST(testLine10x),
4217 TEST(testLine9x),
4218 TEST(testLine8x),
4219 TEST(testLine7bx),
4220 TEST(testLine7ax),
4221 TEST(testLine7x),
4222 TEST(testLine6x),
4223 TEST(testLine5x),
4224 TEST(testLine4x),
4225 TEST(testLine3bx),
4226 TEST(testLine3ax),
4227 TEST(testLine3x),
4228 TEST(testLine2x),
4229 TEST(testLine1x),
4230 TEST(testLine81),
4231 TEST(testLine80),
4232 TEST(testLine79),
4233 TEST(testLine78),
4234 TEST(testLine77),
4235 TEST(testLine76),
4236 TEST(testLine75),
4237 TEST(testLine74),
4238 TEST(testLine73),
4239 TEST(testLine72),
4240 TEST(testLine71),
4241 TEST(testLine70),
4242 TEST(testLine69),
4243 TEST(testLine68h),
4244 TEST(testLine68g),
4245 TEST(testLine68f),
4246 TEST(testLine68e),
4247 TEST(testLine68d),
4248 TEST(testLine68c),
4249 TEST(testLine68b),
4250 TEST(testLine68a),
4251 TEST(testLine67),
4252 TEST(testLine66),
4253 TEST(testLine65),
4254 TEST(testLine64),
4255 TEST(testLine63),
4256 TEST(testLine62),
4257 TEST(testLine61),
4258 TEST(testLine60),
4259 TEST(testLine59),
4260 TEST(testLine58),
4261 TEST(testLine57),
4262 TEST(testLine56),
4263 TEST(testLine55),
4264 TEST(testLine54),
4265 TEST(testLine53),
4266 TEST(testLine52),
4267 TEST(testLine51),
4268 TEST(testLine50),
4269 TEST(testLine49),
4270 TEST(testLine48),
4271 TEST(testLine47),
4272 TEST(testLine46),
4273 TEST(testLine45),
4274 TEST(testLine44),
4275 TEST(testLine43),
4276 TEST(testLine42),
4277 TEST(testLine41),
4278 TEST(testLine40),
4279 TEST(testLine38),
4280 TEST(testLine37),
4281 TEST(testLine36),
4282 TEST(testLine35),
4283 TEST(testLine34),
4284 TEST(testLine33),
4285 TEST(testLine32),
4286 TEST(testLine31),
4287 TEST(testLine30),
4288 TEST(testLine29),
4289 TEST(testLine28),
4290 TEST(testLine27),
4291 TEST(testLine26),
4292 TEST(testLine25),
4293 TEST(testLine24a),
4294 TEST(testLine24),
4295 TEST(testLine23),
4296 TEST(testLine22),
4297 TEST(testLine21),
4298 TEST(testLine20),
4299 TEST(testLine19),
4300 TEST(testLine18),
4301 TEST(testLine17),
4302 TEST(testLine16),
4303 TEST(testLine15),
4304 TEST(testLine14),
4305 TEST(testLine13),
4306 TEST(testLine12),
4307 TEST(testLine11),
4308 TEST(testLine10a),
4309 TEST(testLine10),
4310 TEST(testLine9),
4311 TEST(testLine8),
4312 TEST(testLine7b),
4313 TEST(testLine7a),
4314 TEST(testLine7),
4315 TEST(testLine6),
4316 TEST(testLine5),
4317 TEST(testLine4),
4318 TEST(testLine3b),
4319 TEST(testLine3a),
4320 TEST(testLine3),
4321 TEST(testLine2),
4322 TEST(testLine1),
4323};
4324
caryclark@google.comad65a3e2013-04-15 19:13:59 +00004325static const size_t testCount = SK_ARRAY_COUNT(tests);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004326
4327static TestDesc subTests[] = {
4328 TEST(testLine3),
4329 TEST(testLine2),
4330 TEST(testLine1),
4331};
4332
caryclark@google.comad65a3e2013-04-15 19:13:59 +00004333static const size_t subTestCount = SK_ARRAY_COUNT(subTests);
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004334
4335static void (*firstSubTest)(skiatest::Reporter* ) = 0;
4336
4337static bool runSubTestsFirst = false;
caryclark@google.com4fdbb222013-07-23 15:27:41 +00004338static bool runReverse = false;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004339static void (*stopTest)(skiatest::Reporter* ) = 0;
4340
tfarina@chromium.org78e7b4e2014-01-02 21:45:03 +00004341DEF_TEST(PathOpsSimplify, reporter) {
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004342#ifdef SK_DEBUG
caryclark@google.com570863f2013-09-16 15:55:01 +00004343 SkPathOpsDebug::gMaxWindSum = 4;
4344 SkPathOpsDebug::gMaxWindValue = 4;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004345#endif
4346 if (runSubTestsFirst) {
4347 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, runReverse);
4348 }
4349 RunTestSet(reporter, tests, testCount, firstTest, stopTest, runReverse);
4350 if (!runSubTestsFirst) {
4351 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, runReverse);
4352 }
4353#ifdef SK_DEBUG
caryclark@google.com570863f2013-09-16 15:55:01 +00004354 SkPathOpsDebug::gMaxWindSum = SK_MaxS32;
4355 SkPathOpsDebug::gMaxWindValue = SK_MaxS32;
caryclark@google.com818b0cc2013-04-08 11:50:46 +00004356#endif
4357}