| 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 "SkPathOpsDebug.h" | 8 #include "SkPathOpsDebug.h" |
| 9 #include "SkPath.h" | 9 #include "SkPath.h" |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #endif | 82 #endif |
| 83 | 83 |
| 84 #include "SkOpSegment.h" | 84 #include "SkOpSegment.h" |
| 85 | 85 |
| 86 void SkPathOpsDebug::DumpAngles(const SkTArray<SkOpAngle, true>& angles) { | 86 void SkPathOpsDebug::DumpAngles(const SkTArray<SkOpAngle, true>& angles) { |
| 87 int count = angles.count(); | 87 int count = angles.count(); |
| 88 for (int index = 0; index < count; ++index) { | 88 for (int index = 0; index < count; ++index) { |
| 89 angles[index].dump(); | 89 angles[index].dump(); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 |
| 93 void SkPathOpsDebug::DumpAngles(const SkTArray<SkOpAngle* , true>& angles) { |
| 94 int count = angles.count(); |
| 95 for (int index = 0; index < count; ++index) { |
| 96 angles[index]->dump(); |
| 97 } |
| 98 } |
| 92 #endif // SK_DEBUG || !FORCE_RELEASE | 99 #endif // SK_DEBUG || !FORCE_RELEASE |
| 93 | 100 |
| 94 #ifdef SK_DEBUG | 101 #ifdef SK_DEBUG |
| 95 void SkOpSpan::dump() const { | 102 void SkOpSpan::dump() const { |
| 96 SkDebugf("t="); | 103 SkDebugf("t="); |
| 97 DebugDumpDouble(fT); | 104 DebugDumpDouble(fT); |
| 98 SkDebugf(" pt="); | 105 SkDebugf(" pt="); |
| 99 SkDPoint::DumpSkPoint(fPt); | 106 SkDPoint::DumpSkPoint(fPt); |
| 100 SkDebugf(" other.fID=%d", fOther->debugID()); | 107 SkDebugf(" other.fID=%d", fOther->debugID()); |
| 101 SkDebugf(" [%d] otherT=", fOtherIndex); | 108 SkDebugf(" [%d] otherT=", fOtherIndex); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 125 SkDebugf(" small"); | 132 SkDebugf(" small"); |
| 126 } | 133 } |
| 127 if (fLoop) { | 134 if (fLoop) { |
| 128 SkDebugf(" loop"); | 135 SkDebugf(" loop"); |
| 129 } | 136 } |
| 130 if (fNear) { | 137 if (fNear) { |
| 131 SkDebugf(" near"); | 138 SkDebugf(" near"); |
| 132 } | 139 } |
| 133 SkDebugf("\n"); | 140 SkDebugf("\n"); |
| 134 } | 141 } |
| 142 |
| 143 void Dump(const SkTArray<class SkOpAngle, true>& angles) { |
| 144 SkPathOpsDebug::DumpAngles(angles); |
| 145 } |
| 146 |
| 147 void Dump(const SkTArray<class SkOpAngle* , true>& angles) { |
| 148 SkPathOpsDebug::DumpAngles(angles); |
| 149 } |
| 150 |
| 151 void Dump(const SkTArray<class SkOpAngle, true>* angles) { |
| 152 SkPathOpsDebug::DumpAngles(*angles); |
| 153 } |
| 154 |
| 155 void Dump(const SkTArray<class SkOpAngle* , true>* angles) { |
| 156 SkPathOpsDebug::DumpAngles(*angles); |
| 157 } |
| 158 |
| 135 #endif | 159 #endif |
| 160 |
| OLD | NEW |