| Index: tests/PathOpsCubicReduceOrderTest.cpp
|
| diff --git a/tests/PathOpsCubicReduceOrderTest.cpp b/tests/PathOpsCubicReduceOrderTest.cpp
|
| index e1520aafad8ab3662ce2ae70eae01f909d2bfa03..3702ead69491281a5942dad09d4c024fac6c4523 100644
|
| --- a/tests/PathOpsCubicReduceOrderTest.cpp
|
| +++ b/tests/PathOpsCubicReduceOrderTest.cpp
|
| @@ -98,13 +98,14 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| ? firstTestIndex : SK_MaxS32;
|
| int firstQuadraticModLineTest = run == RunAll ? 0 : run == RunQuadraticModLines
|
| ? firstTestIndex : SK_MaxS32;
|
| +#if 0
|
| int firstComputedLinesTest = run == RunAll ? 0 : run == RunComputedLines
|
| ? firstTestIndex : SK_MaxS32;
|
| -
|
| +#endif
|
| for (index = firstPointDegeneratesTest; index < pointDegenerates_count; ++index) {
|
| const SkDCubic& cubic = pointDegenerates[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 1) {
|
| SkDebugf("[%d] pointDegenerates order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -113,18 +114,17 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| for (index = firstNotPointDegeneratesTest; index < notPointDegenerates_count; ++index) {
|
| const SkDCubic& cubic = notPointDegenerates[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order == 1) {
|
| SkDebugf("[%d] notPointDegenerates order=%d\n", static_cast<int>(index), order);
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics,
|
| - SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| REPORTER_ASSERT(reporter, 0);
|
| }
|
| }
|
| for (index = firstLinesTest; index < lines_count; ++index) {
|
| const SkDCubic& cubic = lines[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 2) {
|
| SkDebugf("[%d] lines order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -133,7 +133,7 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| for (index = firstNotLinesTest; index < notLines_count; ++index) {
|
| const SkDCubic& cubic = notLines[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order == 2) {
|
| SkDebugf("[%d] notLines order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -142,7 +142,7 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| for (index = firstModEpsilonTest; index < modEpsilonLines_count; ++index) {
|
| const SkDCubic& cubic = modEpsilonLines[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order == 2) {
|
| SkDebugf("[%d] line mod by epsilon order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -151,18 +151,17 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| for (index = firstLessEpsilonTest; index < lessEpsilonLines_count; ++index) {
|
| const SkDCubic& cubic = lessEpsilonLines[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 2) {
|
| SkDebugf("[%d] line less by epsilon/2 order=%d\n", static_cast<int>(index), order);
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics,
|
| - SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| REPORTER_ASSERT(reporter, 0);
|
| }
|
| }
|
| for (index = firstNegEpsilonTest; index < negEpsilonLines_count; ++index) {
|
| const SkDCubic& cubic = negEpsilonLines[index];
|
| SkASSERT(ValidCubic(cubic));
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 2) {
|
| SkDebugf("[%d] line neg by epsilon/2 order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -172,7 +171,7 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| const SkDQuad& quad = quadraticPoints[index];
|
| SkASSERT(ValidQuad(quad));
|
| SkDCubic cubic = quad.toCubic();
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 1) {
|
| SkDebugf("[%d] point quad order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -182,7 +181,7 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| const SkDQuad& quad = quadraticLines[index];
|
| SkASSERT(ValidQuad(quad));
|
| SkDCubic cubic = quad.toCubic();
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 2) {
|
| SkDebugf("[%d] line quad order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| @@ -192,14 +191,15 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| const SkDQuad& quad = quadraticModEpsilonLines[index];
|
| SkASSERT(ValidQuad(quad));
|
| SkDCubic cubic = quad.toCubic();
|
| - order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics, SkReduceOrder::kFill_Style);
|
| + order = reducer.reduce(cubic, SkReduceOrder::kAllow_Quadratics);
|
| if (order != 3) {
|
| SkDebugf("[%d] line mod quad order=%d\n", static_cast<int>(index), order);
|
| REPORTER_ASSERT(reporter, 0);
|
| }
|
| }
|
|
|
| - // test if computed line end points are valid
|
| +#if 0 // disable test until stroke reduction is supported
|
| +// test if computed line end points are valid
|
| for (index = firstComputedLinesTest; index < lines_count; ++index) {
|
| const SkDCubic& cubic = lines[index];
|
| SkASSERT(ValidCubic(cubic));
|
| @@ -236,6 +236,7 @@ static void PathOpsReduceOrderCubicTest(skiatest::Reporter* reporter) {
|
| }
|
| }
|
| }
|
| +#endif
|
| }
|
|
|
| #include "TestClassDef.h"
|
|
|