| 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" |
| 11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
| 12 #include "SkForceLinking.h" | 12 #include "SkForceLinking.h" |
| 13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
| 14 #include "SkMutex.h" | 14 #include "SkMutex.h" |
| 15 #include "SkPaint.h" | 15 #include "SkPaint.h" |
| 16 #include "SkRTConf.h" | |
| 17 #include "SkStream.h" | 16 #include "SkStream.h" |
| 18 | 17 |
| 19 #include <stdlib.h> | 18 #include <stdlib.h> |
| 20 | 19 |
| 21 #ifdef SK_BUILD_FOR_MAC | 20 #ifdef SK_BUILD_FOR_MAC |
| 22 #include <sys/sysctl.h> | 21 #include <sys/sysctl.h> |
| 23 #endif | 22 #endif |
| 24 | 23 |
| 25 bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result | 24 bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result |
| 26 SkDEBUGPARAMS(bool skipAssert) | 25 SkDEBUGPARAMS(bool skipAssert) |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 REPORTER_ASSERT(reporter, 0); | 622 REPORTER_ASSERT(reporter, 0); |
| 624 return false; | 623 return false; |
| 625 } | 624 } |
| 626 SkASSERT(out == orig); | 625 SkASSERT(out == orig); |
| 627 return true; | 626 return true; |
| 628 } | 627 } |
| 629 | 628 |
| 630 SK_DECLARE_STATIC_MUTEX(gMutex); | 629 SK_DECLARE_STATIC_MUTEX(gMutex); |
| 631 | 630 |
| 632 void initializeTests(skiatest::Reporter* reporter, const char* test) { | 631 void initializeTests(skiatest::Reporter* reporter, const char* test) { |
| 633 #if 0 // doesn't work yet | |
| 634 SK_CONF_SET("images.jpeg.suppressDecoderWarnings", true); | |
| 635 SK_CONF_SET("images.png.suppressDecoderWarnings", true); | |
| 636 #endif | |
| 637 if (reporter->verbose()) { | 632 if (reporter->verbose()) { |
| 638 SkAutoMutexAcquire lock(gMutex); | 633 SkAutoMutexAcquire lock(gMutex); |
| 639 testName = test; | 634 testName = test; |
| 640 size_t testNameSize = strlen(test); | 635 size_t testNameSize = strlen(test); |
| 641 SkFILEStream inFile("../../experimental/Intersection/op.htm"); | 636 SkFILEStream inFile("../../experimental/Intersection/op.htm"); |
| 642 if (inFile.isValid()) { | 637 if (inFile.isValid()) { |
| 643 SkTDArray<char> inData; | 638 SkTDArray<char> inData; |
| 644 inData.setCount((int) inFile.getLength()); | 639 inData.setCount((int) inFile.getLength()); |
| 645 size_t inLen = inData.count(); | 640 size_t inLen = inData.count(); |
| 646 inFile.read(inData.begin(), inLen); | 641 inFile.read(inData.begin(), inLen); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 if (foundSkip && tests[index].fun != firstTest) { | 725 if (foundSkip && tests[index].fun != firstTest) { |
| 731 SkDebugf(" %s,\n", tests[index].str); | 726 SkDebugf(" %s,\n", tests[index].str); |
| 732 } | 727 } |
| 733 if (tests[index].fun == stopTest || index == last) { | 728 if (tests[index].fun == stopTest || index == last) { |
| 734 break; | 729 break; |
| 735 } | 730 } |
| 736 index += reverse ? -1 : 1; | 731 index += reverse ? -1 : 1; |
| 737 } while (true); | 732 } while (true); |
| 738 #endif | 733 #endif |
| 739 } | 734 } |
| OLD | NEW |