Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: src/pathops/SkPathOpsSimplify.cpp

Issue 1096923003: working on initial winding for cubics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsQuad.cpp ('k') | tests/PathOpsCubicIntersectionTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 SkOpCoincidence coincidence; 192 SkOpCoincidence coincidence;
193 SkOpContour contour; 193 SkOpContour contour;
194 SkOpGlobalState globalState(&coincidence SkDEBUGPARAMS(&contour)); 194 SkOpGlobalState globalState(&coincidence SkDEBUGPARAMS(&contour));
195 #if DEBUG_SORT || DEBUG_SWAP_TOP 195 #if DEBUG_SORT || DEBUG_SWAP_TOP
196 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault; 196 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault;
197 #endif 197 #endif
198 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState); 198 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState);
199 if (!builder.finish(&allocator)) { 199 if (!builder.finish(&allocator)) {
200 return false; 200 return false;
201 } 201 }
202 #if !FORCE_RELEASE 202 #if DEBUG_DUMP_SEGMENTS
203 contour.dumpSegments((SkPathOp) -1); 203 contour.dumpSegments((SkPathOp) -1);
204 #endif 204 #endif
205 SkTDArray<SkOpContour* > contourList; 205 SkTDArray<SkOpContour* > contourList;
206 MakeContourList(&contour, contourList, false, false); 206 MakeContourList(&contour, contourList, false, false);
207 SkOpContour** currentPtr = contourList.begin(); 207 SkOpContour** currentPtr = contourList.begin();
208 if (!currentPtr) { 208 if (!currentPtr) {
209 result->reset(); 209 result->reset();
210 result->setFillType(fillType); 210 result->setFillType(fillType);
211 return true; 211 return true;
212 } 212 }
(...skipping 28 matching lines...) Expand all
241 { // if some edges could not be resolved, assemble remaining fragments 241 { // if some edges could not be resolved, assemble remaining fragments
242 SkPath temp; 242 SkPath temp;
243 temp.setFillType(fillType); 243 temp.setFillType(fillType);
244 SkPathWriter assembled(temp); 244 SkPathWriter assembled(temp);
245 Assemble(wrapper, &assembled); 245 Assemble(wrapper, &assembled);
246 *result = *assembled.nativePath(); 246 *result = *assembled.nativePath();
247 result->setFillType(fillType); 247 result->setFillType(fillType);
248 } 248 }
249 return true; 249 return true;
250 } 250 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsQuad.cpp ('k') | tests/PathOpsCubicIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698