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