| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 return NULL; | 98 return NULL; |
| 99 } | 99 } |
| 100 | 100 |
| 101 static bool bridgeOp(SkTDArray<SkOpContour* >& contourList, const SkPathOp op, | 101 static bool bridgeOp(SkTDArray<SkOpContour* >& contourList, const SkPathOp op, |
| 102 const int xorMask, const int xorOpMask, SkPathWriter* simple, SkChunkAll
oc* allocator) { | 102 const int xorMask, const int xorOpMask, SkPathWriter* simple, SkChunkAll
oc* allocator) { |
| 103 bool firstContour = true; | 103 bool firstContour = true; |
| 104 bool unsortable = false; | 104 bool unsortable = false; |
| 105 bool topUnsortable = false; | 105 bool topUnsortable = false; |
| 106 bool firstPass = true; | 106 bool firstPass = true; |
| 107 SkPoint lastTopLeft; | 107 SkDPoint lastTopLeft; |
| 108 SkPoint topLeft = {SK_ScalarMin, SK_ScalarMin}; | 108 SkDPoint topLeft = {SK_ScalarMin, SK_ScalarMin}; |
| 109 do { | 109 do { |
| 110 SkOpSpanBase* start = NULL; | 110 SkOpSpanBase* start = NULL; |
| 111 SkOpSpanBase* end = NULL; | 111 SkOpSpanBase* end = NULL; |
| 112 bool topDone; | 112 bool topDone; |
| 113 bool onlyVertical = false; | 113 bool onlyVertical = false; |
| 114 lastTopLeft = topLeft; | 114 lastTopLeft = topLeft; |
| 115 SkOpSegment* current = FindSortableTop(contourList, firstPass, SkOpAngle
::kBinarySingle, | 115 SkOpSegment* current = FindSortableTop(contourList, firstPass, SkOpAngle
::kBinarySingle, |
| 116 &firstContour, &start, &end, &topLeft, &topUnsortable, &topDone,
&onlyVertical, | 116 &firstContour, &start, &end, &topLeft, &topUnsortable, &topDone,
&onlyVertical, |
| 117 allocator); | 117 allocator); |
| 118 if (!current) { | 118 if (!current) { |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 { // if some edges could not be resolved, assemble remaining fragments | 343 { // if some edges could not be resolved, assemble remaining fragments |
| 344 SkPath temp; | 344 SkPath temp; |
| 345 temp.setFillType(fillType); | 345 temp.setFillType(fillType); |
| 346 SkPathWriter assembled(temp); | 346 SkPathWriter assembled(temp); |
| 347 Assemble(wrapper, &assembled); | 347 Assemble(wrapper, &assembled); |
| 348 *result = *assembled.nativePath(); | 348 *result = *assembled.nativePath(); |
| 349 result->setFillType(fillType); | 349 result->setFillType(fillType); |
| 350 } | 350 } |
| 351 return true; | 351 return true; |
| 352 } | 352 } |
| OLD | NEW |