| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (sortable) { | 106 if (sortable) { |
| 107 segment = angle->segment(); | 107 segment = angle->segment(); |
| 108 sumWinding = segment->updateWindingReverse(angle); | 108 sumWinding = segment->updateWindingReverse(angle); |
| 109 } | 109 } |
| 110 SkOpSegment* first = nullptr; | 110 SkOpSegment* first = nullptr; |
| 111 const SkOpAngle* firstAngle = angle; | 111 const SkOpAngle* firstAngle = angle; |
| 112 while ((angle = angle->next()) != firstAngle) { | 112 while ((angle = angle->next()) != firstAngle) { |
| 113 segment = angle->segment(); | 113 segment = angle->segment(); |
| 114 SkOpSpanBase* start = angle->start(); | 114 SkOpSpanBase* start = angle->start(); |
| 115 SkOpSpanBase* end = angle->end(); | 115 SkOpSpanBase* end = angle->end(); |
| 116 int maxWinding; | 116 int maxWinding SK_INIT_TO_AVOID_WARNING; |
| 117 if (sortable) { | 117 if (sortable) { |
| 118 segment->setUpWinding(start, end, &maxWinding, &sumWinding); | 118 segment->setUpWinding(start, end, &maxWinding, &sumWinding); |
| 119 } | 119 } |
| 120 if (!segment->done(angle)) { | 120 if (!segment->done(angle)) { |
| 121 if (!first && (sortable || start->starter(end)->windSum() != SK_
MinS32)) { | 121 if (!first && (sortable || start->starter(end)->windSum() != SK_
MinS32)) { |
| 122 first = segment; | 122 first = segment; |
| 123 *startPtr = start; | 123 *startPtr = start; |
| 124 *endPtr = end; | 124 *endPtr = end; |
| 125 } | 125 } |
| 126 // OPTIMIZATION: should this also add to the chase? | 126 // OPTIMIZATION: should this also add to the chase? |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 if (!coincidence->apply()) { | 529 if (!coincidence->apply()) { |
| 530 return false; | 530 return false; |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 #if DEBUG_ACTIVE_SPANS | 533 #if DEBUG_ACTIVE_SPANS |
| 534 coincidence->debugShowCoincidence(); | 534 coincidence->debugShowCoincidence(); |
| 535 DebugShowActiveSpans(contourList); | 535 DebugShowActiveSpans(contourList); |
| 536 #endif | 536 #endif |
| 537 return true; | 537 return true; |
| 538 } | 538 } |
| OLD | NEW |