| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "PathOpsExtendedTest.h" | 8 #include "PathOpsExtendedTest.h" |
| 9 #include "SkRandom.h" | 9 #include "SkRandom.h" |
| 10 #include "SkRegion.h" | 10 #include "SkRegion.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 for (int trial = FLAGS_processOffset * trialRuns; --trialRuns >=
0; ++trial) { | 104 for (int trial = FLAGS_processOffset * trialRuns; --trialRuns >=
0; ++trial) { |
| 105 if (skipOneOffs) { | 105 if (skipOneOffs) { |
| 106 for (const OvalSetOneOff& oneOff : oneOffs) { | 106 for (const OvalSetOneOff& oneOff : oneOffs) { |
| 107 if (col == oneOff.fCol && row == oneOff.fRow && rot
== oneOff.fRot | 107 if (col == oneOff.fCol && row == oneOff.fRow && rot
== oneOff.fRot |
| 108 && trial == oneOff.fTrial) { | 108 && trial == oneOff.fTrial) { |
| 109 goto skipTest; | 109 goto skipTest; |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 setupOne(reporter, col, row, rot, trial); | 113 setupOne(reporter, col, row, rot, trial); |
| 114 skipTest: | 114 skipTest: |
| 115 ; | 115 ; |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 DEF_TEST(SixtyOvalsOneOff, reporter) { | 122 DEF_TEST(SixtyOvalsOneOff, reporter) { |
| 123 for (const OvalSetOneOff& oneOff : oneOffs) { | 123 for (const OvalSetOneOff& oneOff : oneOffs) { |
| 124 setupOne(reporter, oneOff.fCol, oneOff.fRow, oneOff.fRot, oneOff.fTrial)
; | 124 setupOne(reporter, oneOff.fCol, oneOff.fRow, oneOff.fRot, oneOff.fTrial)
; |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 DEF_TEST(SixtyOvals_2_2_9_73_reduced, reporter) { | 397 DEF_TEST(SixtyOvals_2_2_9_73_reduced, reporter) { |
| 398 SkPath path; | 398 SkPath path; |
| 399 path.moveTo(377.219f, -141.981f); | 399 path.moveTo(377.219f, -141.981f); |
| 400 path.conicTo(40.5787f, -201.34f, 23.1855f, -102.698f, 0.707107f); | 400 path.conicTo(40.5787f, -201.34f, 23.1855f, -102.698f, 0.707107f); |
| 401 path.lineTo(377.219f, -141.981f); | 401 path.lineTo(377.219f, -141.981f); |
| 402 path.close(); | 402 path.close(); |
| 403 path.moveTo(306.588f, -227.984f); | 403 path.moveTo(306.588f, -227.984f); |
| 404 path.conicTo(212.465f, -262.242f, 95.5512f, 58.9764f, 0.707107f); | 404 path.conicTo(212.465f, -262.242f, 95.5512f, 58.9764f, 0.707107f); |
| 405 path.lineTo(306.588f, -227.984f); | 405 path.lineTo(306.588f, -227.984f); |
| 406 path.close(); | 406 path.close(); |
| 407 testSimplify(reporter, path, __FUNCTION__); | 407 testSimplify(reporter, path, __FUNCTION__); |
| 408 } | 408 } |
| 409 | 409 |
| 410 DEF_TEST(SixtyOvalsA, reporter) { | 410 DEF_TEST(SixtyOvalsA, reporter) { |
| 411 SkPath path; | 411 SkPath path; |
| 412 path.setFillType(SkPath::kEvenOdd_FillType); | 412 path.setFillType(SkPath::kEvenOdd_FillType); |
| 413 path.moveTo(11.1722f, -8.10398f); | 413 path.moveTo(11.1722f, -8.10398f); |
| 414 path.conicTo(22.9143f, -10.3787f, 23.7764f, -7.72542f, 1.00863f); | 414 path.conicTo(22.9143f, -10.3787f, 23.7764f, -7.72542f, 1.00863f); |
| 415 path.conicTo(24.6671f, -4.98406f, 13.8147f, 0.0166066f, 0.973016f); | 415 path.conicTo(24.6671f, -4.98406f, 13.8147f, 0.0166066f, 0.973016f); |
| 416 path.conicTo(24.6378f, 5.07425f, 23.7764f, 7.72542f, 1.00888f); | 416 path.conicTo(24.6378f, 5.07425f, 23.7764f, 7.72542f, 1.00888f); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 } | 630 } |
| 631 | 631 |
| 632 DEF_TEST(PathOps64OvalsAsQuads, reporter) { | 632 DEF_TEST(PathOps64OvalsAsQuads, reporter) { |
| 633 return; // don't execute this for now | 633 return; // don't execute this for now |
| 634 SkPath path, result; | 634 SkPath path, result; |
| 635 SkOpBuilder builder; | 635 SkOpBuilder builder; |
| 636 SkParsePath::FromSVGString(ovalsAsQuads, &path); | 636 SkParsePath::FromSVGString(ovalsAsQuads, &path); |
| 637 OvalSet set = {{0, 0, 0, 0}, 2, 3, 9, 100, 100}; | 637 OvalSet set = {{0, 0, 0, 0}, 2, 3, 9, 100, 100}; |
| 638 testOvalSet(set, path, &builder, nullptr, &result); | 638 testOvalSet(set, path, &builder, nullptr, &result); |
| 639 } | 639 } |
| OLD | NEW |