From aec251012542e971100e218bf463adbfb5d21d20 Mon Sep 17 00:00:00 2001 From: caryclark Date: Wed, 29 Apr 2015 08:28:30 -0700 Subject: minor fixes to cubics code and overall alignment of how bounds and tops are computed for all curve types All but 17 extended tests work. A helper function is privately added to SkPath.h to permit a test to modify a given point in a path. BUG=skia:3588 Review URL: https://codereview.chromium.org/1107353004 --- tests/PathOpsExtendedTest.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/PathOpsExtendedTest.cpp') diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp index 92b0e87465..9c57797987 100644 --- a/tests/PathOpsExtendedTest.cpp +++ b/tests/PathOpsExtendedTest.cpp @@ -289,7 +289,7 @@ int comparePaths(skiatest::Reporter* reporter, const char* filename, const SkPat return errors2x2 > MAX_ERRORS ? errors2x2 : 0; } -const int gTestFirst = 20; +const int gTestFirst = 41; static int gTestNo = gTestFirst; static SkTDArray gTestOp; @@ -309,7 +309,7 @@ static void showPathOpPath(const char* testName, const SkPath& one, const SkPath SkPathOpsDebug::ShowOnePath(b, "pathB", false); SkDebugf(" testPathOp(reporter, path, pathB, %s, filename);\n", opStrs[shapeOp]); SkDebugf("}\n"); - drawAsciiPaths(scaledOne, scaledTwo, true); + drawAsciiPaths(scaledOne, scaledTwo, false); } void ShowTestArray(const char* testName) { @@ -341,9 +341,10 @@ static int comparePaths(skiatest::Reporter* reporter, const char* testName, cons } if (errors2x2 > MAX_ERRORS) { SkAutoMutexAcquire autoM(compareDebugOut3); - SkDebugf("\n*** this test fails ***\n"); showPathOpPath(testName, one, two, a, b, scaledOne, scaledTwo, shapeOp, scale); + SkDebugf("\n/*"); REPORTER_ASSERT(reporter, 0); + SkDebugf(" */\n"); } else if (errors2x2 == MAX_ERRORS || errors2x2 == MAX_ERRORS - 1) { SkAutoMutexAcquire autoM(compareDebugOut4); showPathOpPath(testName, one, two, a, b, scaledOne, scaledTwo, shapeOp, scale); @@ -531,9 +532,6 @@ static bool innerPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkP scaledOut.setFillType(out.getFillType()); int result = comparePaths(reporter, testName, pathOut, scaledPathOut, out, scaledOut, bitmap, a, b, shapeOp, scale, expectSuccess); - if (result) { - REPORTER_ASSERT(reporter, 0); - } reporter->bumpTestCount(); return result == 0; } -- cgit v1.2.3