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