| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 if (result != &path) { | 160 if (result != &path) { |
| 161 *result = path; | 161 *result = path; |
| 162 } | 162 } |
| 163 result->setFillType(fillType); | 163 result->setFillType(fillType); |
| 164 return true; | 164 return true; |
| 165 } | 165 } |
| 166 // turn path into list of segments | 166 // turn path into list of segments |
| 167 SkOpCoincidence coincidence; | 167 SkOpCoincidence coincidence; |
| 168 SkOpContour contour; | 168 SkOpContour contour; |
| 169 SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour); | 169 SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour); |
| 170 SkOpGlobalState globalState(&coincidence, contourList SkDEBUGPARAMS(NULL)); | 170 SkOpGlobalState globalState(&coincidence, contourList SkDEBUGPARAMS(nullptr
)); |
| 171 #if DEBUG_SORT | 171 #if DEBUG_SORT |
| 172 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault; | 172 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault; |
| 173 #endif | 173 #endif |
| 174 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState); | 174 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState); |
| 175 if (!builder.finish(&allocator)) { | 175 if (!builder.finish(&allocator)) { |
| 176 return false; | 176 return false; |
| 177 } | 177 } |
| 178 #if DEBUG_DUMP_SEGMENTS | 178 #if DEBUG_DUMP_SEGMENTS |
| 179 contour.dumpSegments((SkPathOp) -1); | 179 contour.dumpSegments((SkPathOp) -1); |
| 180 #endif | 180 #endif |
| (...skipping 25 matching lines...) Expand all Loading... |
| 206 SkPath temp; | 206 SkPath temp; |
| 207 temp.setFillType(fillType); | 207 temp.setFillType(fillType); |
| 208 SkPathWriter assembled(temp); | 208 SkPathWriter assembled(temp); |
| 209 Assemble(wrapper, &assembled); | 209 Assemble(wrapper, &assembled); |
| 210 *result = *assembled.nativePath(); | 210 *result = *assembled.nativePath(); |
| 211 result->setFillType(fillType); | 211 result->setFillType(fillType); |
| 212 } | 212 } |
| 213 return true; | 213 return true; |
| 214 } | 214 } |
| 215 | 215 |
| OLD | NEW |