| 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 "SkOpEdgeBuilder.h" | 8 #include "SkOpEdgeBuilder.h" |
| 9 #include "SkPathOpsCommon.h" | 9 #include "SkPathOpsCommon.h" |
| 10 #include "SkPathWriter.h" | 10 #include "SkPathWriter.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 SkTDArray<SkOpSpan*> chaseArray; | 158 SkTDArray<SkOpSpan*> chaseArray; |
| 159 do { | 159 do { |
| 160 if (current->activeOp(index, endIndex, xorMask, xorOpMask, op)) { | 160 if (current->activeOp(index, endIndex, xorMask, xorOpMask, op)) { |
| 161 do { | 161 do { |
| 162 if (!unsortable && current->done()) { | 162 if (!unsortable && current->done()) { |
| 163 #if DEBUG_ACTIVE_SPANS | 163 #if DEBUG_ACTIVE_SPANS |
| 164 DebugShowActiveSpans(contourList); | 164 DebugShowActiveSpans(contourList); |
| 165 #endif | 165 #endif |
| 166 if (simple->isEmpty()) { | 166 if (simple->isEmpty()) { |
| 167 simple->init(); | 167 simple->init(); |
| 168 break; | |
| 169 } | 168 } |
| 169 break; |
| 170 } | 170 } |
| 171 SkASSERT(unsortable || !current->done()); | 171 SkASSERT(unsortable || !current->done()); |
| 172 int nextStart = index; | 172 int nextStart = index; |
| 173 int nextEnd = endIndex; | 173 int nextEnd = endIndex; |
| 174 SkOpSegment* next = current->findNextOp(&chaseArray, &nextSt
art, &nextEnd, | 174 SkOpSegment* next = current->findNextOp(&chaseArray, &nextSt
art, &nextEnd, |
| 175 &unsortable, op, xorMask, xorOpMask); | 175 &unsortable, op, xorMask, xorOpMask); |
| 176 if (!next) { | 176 if (!next) { |
| 177 if (!unsortable && simple->hasMove() | 177 if (!unsortable && simple->hasMove() |
| 178 && current->verb() != SkPath::kLine_Verb | 178 && current->verb() != SkPath::kLine_Verb |
| 179 && !simple->isClosed()) { | 179 && !simple->isClosed()) { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 { // if some edges could not be resolved, assemble remaining fragments | 324 { // if some edges could not be resolved, assemble remaining fragments |
| 325 SkPath temp; | 325 SkPath temp; |
| 326 temp.setFillType(fillType); | 326 temp.setFillType(fillType); |
| 327 SkPathWriter assembled(temp); | 327 SkPathWriter assembled(temp); |
| 328 Assemble(wrapper, &assembled); | 328 Assemble(wrapper, &assembled); |
| 329 *result = *assembled.nativePath(); | 329 *result = *assembled.nativePath(); |
| 330 result->setFillType(fillType); | 330 result->setFillType(fillType); |
| 331 } | 331 } |
| 332 return true; | 332 return true; |
| 333 } | 333 } |
| OLD | NEW |