| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkMutex.h" | 8 #include "SkMutex.h" |
| 9 #include "SkPath.h" | 9 #include "SkPath.h" |
| 10 #include "SkPathOpsDebug.h" | 10 #include "SkPathOpsDebug.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (wind == SK_MinS32) { | 68 if (wind == SK_MinS32) { |
| 69 SkDebugf("?"); | 69 SkDebugf("?"); |
| 70 } else { | 70 } else { |
| 71 SkDebugf("%d", wind); | 71 SkDebugf("%d", wind); |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 #endif // defined SK_DEBUG || !FORCE_RELEASE | 74 #endif // defined SK_DEBUG || !FORCE_RELEASE |
| 75 | 75 |
| 76 | 76 |
| 77 #if DEBUG_SHOW_TEST_NAME | 77 #if DEBUG_SHOW_TEST_NAME |
| 78 void* SkPathOpsDebug::CreateNameStr() { | 78 void* SkPathOpsDebug::CreateNameStr() { return new char[DEBUG_FILENAME_STRING_LE
NGTH]; } |
| 79 return SkNEW_ARRAY(char, DEBUG_FILENAME_STRING_LENGTH); | |
| 80 } | |
| 81 | 79 |
| 82 void SkPathOpsDebug::DeleteNameStr(void* v) { | 80 void SkPathOpsDebug::DeleteNameStr(void* v) { delete[] reinterpret_cast<char*>(v
); } |
| 83 SkDELETE_ARRAY(reinterpret_cast<char* >(v)); | |
| 84 } | |
| 85 | 81 |
| 86 void SkPathOpsDebug::BumpTestName(char* test) { | 82 void SkPathOpsDebug::BumpTestName(char* test) { |
| 87 char* num = test + strlen(test); | 83 char* num = test + strlen(test); |
| 88 while (num[-1] >= '0' && num[-1] <= '9') { | 84 while (num[-1] >= '0' && num[-1] <= '9') { |
| 89 --num; | 85 --num; |
| 90 } | 86 } |
| 91 if (num[0] == '\0') { | 87 if (num[0] == '\0') { |
| 92 return; | 88 return; |
| 93 } | 89 } |
| 94 int dec = atoi(num); | 90 int dec = atoi(num); |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 #endif | 663 #endif |
| 668 SkPath::FillType fillType = path.getFillType(); | 664 SkPath::FillType fillType = path.getFillType(); |
| 669 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver
seEvenOdd_FillType); | 665 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver
seEvenOdd_FillType); |
| 670 if (includeDeclaration) { | 666 if (includeDeclaration) { |
| 671 SkDebugf(" SkPath %s;\n", name); | 667 SkDebugf(" SkPath %s;\n", name); |
| 672 } | 668 } |
| 673 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); | 669 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); |
| 674 iter.setPath(path); | 670 iter.setPath(path); |
| 675 showPathContours(iter, name); | 671 showPathContours(iter, name); |
| 676 } | 672 } |
| OLD | NEW |