| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "PathOpsThreadedCommon.h" | 9 #include "PathOpsThreadedCommon.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 sk_bzero(temp, sizeof(temp)); | 436 sk_bzero(temp, sizeof(temp)); |
| 437 SkMemoryWStream stream(temp, sizeof(temp)); | 437 SkMemoryWStream stream(temp, sizeof(temp)); |
| 438 const char* pathPrefix = NULL; | 438 const char* pathPrefix = NULL; |
| 439 const char* nameSuffix = NULL; | 439 const char* nameSuffix = NULL; |
| 440 if (fillType == SkPath::kEvenOdd_FillType) { | 440 if (fillType == SkPath::kEvenOdd_FillType) { |
| 441 pathPrefix = " path.setFillType(SkPath::kEvenOdd_FillType);\n"; | 441 pathPrefix = " path.setFillType(SkPath::kEvenOdd_FillType);\n"; |
| 442 nameSuffix = "x"; | 442 nameSuffix = "x"; |
| 443 } | 443 } |
| 444 const char testFunction[] = "testSimplify(reporter, path);"; | 444 const char testFunction[] = "testSimplify(reporter, path);"; |
| 445 outputToStream(pathStr, pathPrefix, nameSuffix, testFunction, false, str
eam); | 445 outputToStream(pathStr, pathPrefix, nameSuffix, testFunction, false, str
eam); |
| 446 SkDebugf(temp); | 446 SkDebugf("%s", temp); |
| 447 REPORTER_ASSERT(state.fReporter, 0); | 447 REPORTER_ASSERT(state.fReporter, 0); |
| 448 } | 448 } |
| 449 state.fReporter->bumpTestCount(); | 449 state.fReporter->bumpTestCount(); |
| 450 return result == 0; | 450 return result == 0; |
| 451 } | 451 } |
| 452 | 452 |
| 453 bool testSimplify(skiatest::Reporter* reporter, const SkPath& path, const char*
filename) { | 453 bool testSimplify(skiatest::Reporter* reporter, const SkPath& path, const char*
filename) { |
| 454 #if DEBUG_SHOW_TEST_NAME | 454 #if DEBUG_SHOW_TEST_NAME |
| 455 showPathData(path); | 455 showPathData(path); |
| 456 #endif | 456 #endif |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 if (tests[index].fun == stopTest) { | 633 if (tests[index].fun == stopTest) { |
| 634 SkDebugf("lastTest\n"); | 634 SkDebugf("lastTest\n"); |
| 635 break; | 635 break; |
| 636 } | 636 } |
| 637 if (index == last) { | 637 if (index == last) { |
| 638 break; | 638 break; |
| 639 } | 639 } |
| 640 index += reverse ? -1 : 1; | 640 index += reverse ? -1 : 1; |
| 641 } while (true); | 641 } while (true); |
| 642 } | 642 } |
| OLD | NEW |