| 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 #include "SkAddIntersections.h" | 7 #include "SkAddIntersections.h" |
| 8 #include "SkOpCoincidence.h" | 8 #include "SkOpCoincidence.h" |
| 9 #include "SkOpEdgeBuilder.h" | 9 #include "SkOpEdgeBuilder.h" |
| 10 #include "SkPathOpsCommon.h" | 10 #include "SkPathOpsCommon.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 #endif | 117 #endif |
| 118 return last->segment(); | 118 return last->segment(); |
| 119 } | 119 } |
| 120 if (done) { | 120 if (done) { |
| 121 continue; | 121 continue; |
| 122 } | 122 } |
| 123 // find first angle, initialize winding to computed wind sum | 123 // find first angle, initialize winding to computed wind sum |
| 124 int winding; | 124 int winding; |
| 125 bool sortable; | 125 bool sortable; |
| 126 const SkOpAngle* angle = AngleWinding(*startPtr, *endPtr, &winding, &sor
table); | 126 const SkOpAngle* angle = AngleWinding(*startPtr, *endPtr, &winding, &sor
table); |
| 127 if (!angle) { |
| 128 return nullptr; |
| 129 } |
| 127 if (winding == SK_MinS32) { | 130 if (winding == SK_MinS32) { |
| 128 continue; | 131 continue; |
| 129 } | 132 } |
| 130 int sumWinding SK_INIT_TO_AVOID_WARNING; | 133 int sumWinding SK_INIT_TO_AVOID_WARNING; |
| 131 if (sortable) { | 134 if (sortable) { |
| 132 segment = angle->segment(); | 135 segment = angle->segment(); |
| 133 sumWinding = segment->updateWindingReverse(angle); | 136 sumWinding = segment->updateWindingReverse(angle); |
| 134 } | 137 } |
| 135 SkOpSegment* first = nullptr; | 138 SkOpSegment* first = nullptr; |
| 136 const SkOpAngle* firstAngle = angle; | 139 const SkOpAngle* firstAngle = angle; |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 } | 583 } |
| 581 #if DEBUG_COINCIDENCE_VERBOSE | 584 #if DEBUG_COINCIDENCE_VERBOSE |
| 582 coincidence->debugShowCoincidence(); | 585 coincidence->debugShowCoincidence(); |
| 583 #endif | 586 #endif |
| 584 #if DEBUG_COINCIDENCE | 587 #if DEBUG_COINCIDENCE |
| 585 coincidence->debugValidate(); | 588 coincidence->debugValidate(); |
| 586 #endif | 589 #endif |
| 587 SkPathOpsDebug::ShowActiveSpans(contourList); | 590 SkPathOpsDebug::ShowActiveSpans(contourList); |
| 588 return true; | 591 return true; |
| 589 } | 592 } |
| OLD | NEW |