| 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 "SkOpEdgeBuilder.h" | 7 #include "SkOpEdgeBuilder.h" |
| 8 #include "SkPathOpsCommon.h" | 8 #include "SkPathOpsCommon.h" |
| 9 #include "SkPathWriter.h" | 9 #include "SkPathWriter.h" |
| 10 #include "SkTSort.h" | 10 #include "SkTSort.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 *chase.insert(0) = span; | 127 *chase.insert(0) = span; |
| 128 #else | 128 #else |
| 129 *chase.append() = span; | 129 *chase.append() = span; |
| 130 #endif | 130 #endif |
| 131 return last->segment(); | 131 return last->segment(); |
| 132 } | 132 } |
| 133 if (done == angles.count()) { | 133 if (done == angles.count()) { |
| 134 continue; | 134 continue; |
| 135 } | 135 } |
| 136 SkTDArray<SkOpAngle*> sorted; | 136 SkTDArray<SkOpAngle*> sorted; |
| 137 bool sortable = SkOpSegment::SortAngles(angles, &sorted); | 137 bool sortable = SkOpSegment::SortAngles(angles, &sorted, |
| 138 SkOpSegment::kMayBeUnordered_SortAngleKind); |
| 138 int angleCount = sorted.count(); | 139 int angleCount = sorted.count(); |
| 139 #if DEBUG_SORT | 140 #if DEBUG_SORT |
| 140 sorted[0]->segment()->debugShowSort(__FUNCTION__, sorted, 0, 0, 0); | 141 sorted[0]->segment()->debugShowSort(__FUNCTION__, sorted, 0, 0, 0); |
| 141 #endif | 142 #endif |
| 142 if (!sortable) { | 143 if (!sortable) { |
| 143 continue; | 144 continue; |
| 144 } | 145 } |
| 145 // find first angle, initialize winding to computed fWindSum | 146 // find first angle, initialize winding to computed fWindSum |
| 146 int firstIndex = -1; | 147 int firstIndex = -1; |
| 147 const SkOpAngle* angle; | 148 const SkOpAngle* angle; |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } | 575 } |
| 575 } | 576 } |
| 576 } while (rIndex < count); | 577 } while (rIndex < count); |
| 577 #if DEBUG_ASSEMBLE | 578 #if DEBUG_ASSEMBLE |
| 578 for (rIndex = 0; rIndex < count; ++rIndex) { | 579 for (rIndex = 0; rIndex < count; ++rIndex) { |
| 579 SkASSERT(sLink[rIndex] == SK_MaxS32); | 580 SkASSERT(sLink[rIndex] == SK_MaxS32); |
| 580 SkASSERT(eLink[rIndex] == SK_MaxS32); | 581 SkASSERT(eLink[rIndex] == SK_MaxS32); |
| 581 } | 582 } |
| 582 #endif | 583 #endif |
| 583 } | 584 } |
| OLD | NEW |