| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "PathOpsTSectDebug.h" | 8 #include "PathOpsTSectDebug.h" |
| 9 #include "SkOpCoincidence.h" | 9 #include "SkOpCoincidence.h" |
| 10 #include "SkOpContour.h" | 10 #include "SkOpContour.h" |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 799 } |
| 800 | 800 |
| 801 const SkOpAngle* SkOpAngle::debugAngle(int id) const { | 801 const SkOpAngle* SkOpAngle::debugAngle(int id) const { |
| 802 return this->segment()->debugAngle(id); | 802 return this->segment()->debugAngle(id); |
| 803 } | 803 } |
| 804 | 804 |
| 805 const SkOpCoincidence* SkOpAngle::debugCoincidence() const { | 805 const SkOpCoincidence* SkOpAngle::debugCoincidence() const { |
| 806 return this->segment()->debugCoincidence(); | 806 return this->segment()->debugCoincidence(); |
| 807 } | 807 } |
| 808 | 808 |
| 809 SkOpContour* SkOpAngle::debugContour(int id) { | 809 SkOpContour* SkOpAngle::debugContour(int id) const { |
| 810 return this->segment()->debugContour(id); | 810 return this->segment()->debugContour(id); |
| 811 } | 811 } |
| 812 | 812 |
| 813 const SkOpPtT* SkOpAngle::debugPtT(int id) const { | 813 const SkOpPtT* SkOpAngle::debugPtT(int id) const { |
| 814 return this->segment()->debugPtT(id); | 814 return this->segment()->debugPtT(id); |
| 815 } | 815 } |
| 816 | 816 |
| 817 const SkOpSegment* SkOpAngle::debugSegment(int id) const { | 817 const SkOpSegment* SkOpAngle::debugSegment(int id) const { |
| 818 return this->segment()->debugSegment(id); | 818 return this->segment()->debugSegment(id); |
| 819 } | 819 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 return true; | 933 return true; |
| 934 } | 934 } |
| 935 } while ((!limit || ++loop <= limit) && (ptT = ptT->next()) && ptT != this); | 935 } while ((!limit || ++loop <= limit) && (ptT = ptT->next()) && ptT != this); |
| 936 return false; | 936 return false; |
| 937 } | 937 } |
| 938 | 938 |
| 939 const SkOpAngle* SkOpPtT::debugAngle(int id) const { | 939 const SkOpAngle* SkOpPtT::debugAngle(int id) const { |
| 940 return this->span()->debugAngle(id); | 940 return this->span()->debugAngle(id); |
| 941 } | 941 } |
| 942 | 942 |
| 943 SkOpContour* SkOpPtT::debugContour(int id) { | 943 SkOpContour* SkOpPtT::debugContour(int id) const { |
| 944 return this->span()->debugContour(id); | 944 return this->span()->debugContour(id); |
| 945 } | 945 } |
| 946 | 946 |
| 947 const SkOpCoincidence* SkOpPtT::debugCoincidence() const { | 947 const SkOpCoincidence* SkOpPtT::debugCoincidence() const { |
| 948 return this->span()->debugCoincidence(); | 948 return this->span()->debugCoincidence(); |
| 949 } | 949 } |
| 950 | 950 |
| 951 const SkOpPtT* SkOpPtT::debugPtT(int id) const { | 951 const SkOpPtT* SkOpPtT::debugPtT(int id) const { |
| 952 return this->span()->debugPtT(id); | 952 return this->span()->debugPtT(id); |
| 953 } | 953 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 } | 993 } |
| 994 | 994 |
| 995 const SkOpAngle* SkOpSpanBase::debugAngle(int id) const { | 995 const SkOpAngle* SkOpSpanBase::debugAngle(int id) const { |
| 996 return this->segment()->debugAngle(id); | 996 return this->segment()->debugAngle(id); |
| 997 } | 997 } |
| 998 | 998 |
| 999 const SkOpCoincidence* SkOpSpanBase::debugCoincidence() const { | 999 const SkOpCoincidence* SkOpSpanBase::debugCoincidence() const { |
| 1000 return this->segment()->debugCoincidence(); | 1000 return this->segment()->debugCoincidence(); |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 SkOpContour* SkOpSpanBase::debugContour(int id) { | 1003 SkOpContour* SkOpSpanBase::debugContour(int id) const { |
| 1004 return this->segment()->debugContour(id); | 1004 return this->segment()->debugContour(id); |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 const SkOpPtT* SkOpSpanBase::debugPtT(int id) const { | 1007 const SkOpPtT* SkOpSpanBase::debugPtT(int id) const { |
| 1008 return this->segment()->debugPtT(id); | 1008 return this->segment()->debugPtT(id); |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 const SkOpSegment* SkOpSpanBase::debugSegment(int id) const { | 1011 const SkOpSegment* SkOpSpanBase::debugSegment(int id) const { |
| 1012 return this->segment()->debugSegment(id); | 1012 return this->segment()->debugSegment(id); |
| 1013 } | 1013 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 void SkOpSpanBase::dumpBase() const { | 1036 void SkOpSpanBase::dumpBase() const { |
| 1037 if (this->fAligned) { | 1037 if (this->fAligned) { |
| 1038 SkDebugf(" aligned"); | 1038 SkDebugf(" aligned"); |
| 1039 } | 1039 } |
| 1040 if (this->fChased) { | 1040 if (this->fChased) { |
| 1041 SkDebugf(" chased"); | 1041 SkDebugf(" chased"); |
| 1042 } | 1042 } |
| 1043 #ifdef SK_DEBUG | 1043 #ifdef SK_DEBUG |
| 1044 if (this->fDeleted) { | 1044 if (this->fDebugDeleted) { |
| 1045 SkDebugf(" deleted"); | 1045 SkDebugf(" deleted"); |
| 1046 } | 1046 } |
| 1047 #endif | 1047 #endif |
| 1048 if (!this->final()) { | 1048 if (!this->final()) { |
| 1049 this->upCast()->dumpSpan(); | 1049 this->upCast()->dumpSpan(); |
| 1050 } | 1050 } |
| 1051 const SkOpSpanBase* coin = this->coinEnd(); | 1051 const SkOpSpanBase* coin = this->coinEnd(); |
| 1052 if (this != coin) { | 1052 if (this != coin) { |
| 1053 SkDebugf(" coinEnd seg/span=%d/%d", coin->segment()->debugID(), coin->de
bugID()); | 1053 SkDebugf(" coinEnd seg/span=%d/%d", coin->segment()->debugID(), coin->de
bugID()); |
| 1054 } else if (this->final() || !this->upCast()->isCoincident()) { | 1054 } else if (this->final() || !this->upCast()->isCoincident()) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 | 1104 |
| 1105 const SkOpAngle* SkOpSegment::debugAngle(int id) const { | 1105 const SkOpAngle* SkOpSegment::debugAngle(int id) const { |
| 1106 return this->contour()->debugAngle(id); | 1106 return this->contour()->debugAngle(id); |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 | 1109 |
| 1110 const SkOpCoincidence* SkOpSegment::debugCoincidence() const { | 1110 const SkOpCoincidence* SkOpSegment::debugCoincidence() const { |
| 1111 return this->contour()->debugCoincidence(); | 1111 return this->contour()->debugCoincidence(); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 SkOpContour* SkOpSegment::debugContour(int id) { | 1114 SkOpContour* SkOpSegment::debugContour(int id) const { |
| 1115 return this->contour()->debugContour(id); | 1115 return this->contour()->debugContour(id); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 const SkOpPtT* SkOpSegment::debugPtT(int id) const { | 1118 const SkOpPtT* SkOpSegment::debugPtT(int id) const { |
| 1119 return this->contour()->debugPtT(id); | 1119 return this->contour()->debugPtT(id); |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 const SkOpSegment* SkOpSegment::debugSegment(int id) const { | 1122 const SkOpSegment* SkOpSegment::debugSegment(int id) const { |
| 1123 return this->contour()->debugSegment(id); | 1123 return this->contour()->debugSegment(id); |
| 1124 } | 1124 } |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 SkOpAngle* angle = tail->fromAngle(); | 1382 SkOpAngle* angle = tail->fromAngle(); |
| 1383 if (angle && angle->debugID() == id) { | 1383 if (angle && angle->debugID() == id) { |
| 1384 return angle; | 1384 return angle; |
| 1385 } | 1385 } |
| 1386 segment = segment->next(); | 1386 segment = segment->next(); |
| 1387 } | 1387 } |
| 1388 } while ((contour = contour->next())); | 1388 } while ((contour = contour->next())); |
| 1389 return nullptr; | 1389 return nullptr; |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 SkOpContour* SkOpGlobalState::debugContour(int id) { | 1392 SkOpContour* SkOpGlobalState::debugContour(int id) const { |
| 1393 SkOpContour* contour = fContourHead; | 1393 SkOpContour* contour = fContourHead; |
| 1394 do { | 1394 do { |
| 1395 if (contour->debugID() == id) { | 1395 if (contour->debugID() == id) { |
| 1396 return contour; | 1396 return contour; |
| 1397 } | 1397 } |
| 1398 } while ((contour = contour->next())); | 1398 } while ((contour = contour->next())); |
| 1399 return nullptr; | 1399 return nullptr; |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 const SkOpPtT* SkOpGlobalState::debugPtT(int id) const { | 1402 const SkOpPtT* SkOpGlobalState::debugPtT(int id) const { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 segment = segment->next(); | 1454 segment = segment->next(); |
| 1455 } | 1455 } |
| 1456 } while ((contour = contour->next())); | 1456 } while ((contour = contour->next())); |
| 1457 return nullptr; | 1457 return nullptr; |
| 1458 } | 1458 } |
| 1459 #endif | 1459 #endif |
| 1460 | 1460 |
| 1461 #if DEBUG_T_SECT_DUMP > 1 | 1461 #if DEBUG_T_SECT_DUMP > 1 |
| 1462 int gDumpTSectNum; | 1462 int gDumpTSectNum; |
| 1463 #endif | 1463 #endif |
| OLD | NEW |