aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsCubicReduceOrderTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-25 14:18:21 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-25 14:18:21 +0000
commit927b7028d44c46e9cbc18368f16ec2262d59d94d (patch)
treeecfdf83c9fda4c8ff9a83230bdf558106086a534 /tests/PathOpsCubicReduceOrderTest.cpp
parent6fcb0cdaa2cd443e63c56957c780632a9cbc838f (diff)
remove unused reduce order code
BUG= Review URL: https://codereview.chromium.org/85763002 git-svn-id: http://skia.googlecode.com/svn/trunk@12377 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PathOpsCubicReduceOrderTest.cpp')
-rw-r--r--tests/PathOpsCubicReduceOrderTest.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/PathOpsCubicReduceOrderTest.cpp b/tests/PathOpsCubicReduceOrderTest.cpp
index e1520aafad..3702ead694 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"