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

Side by Side Diff: src/pathops/SkPathOpsOp.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/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsPoint.h » ('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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // turn path into list of segments 291 // turn path into list of segments
292 SkOpEdgeBuilder builder(*minuend, &contour, &allocator, &globalState); 292 SkOpEdgeBuilder builder(*minuend, &contour, &allocator, &globalState);
293 if (builder.unparseable()) { 293 if (builder.unparseable()) {
294 return false; 294 return false;
295 } 295 }
296 const int xorMask = builder.xorMask(); 296 const int xorMask = builder.xorMask();
297 builder.addOperand(*subtrahend); 297 builder.addOperand(*subtrahend);
298 if (!builder.finish(&allocator)) { 298 if (!builder.finish(&allocator)) {
299 return false; 299 return false;
300 } 300 }
301 #if !FORCE_RELEASE 301 #if DEBUG_DUMP_SEGMENTS
302 contour.dumpSegments(op); 302 contour.dumpSegments(op);
303 #endif 303 #endif
304 304
305 const int xorOpMask = builder.xorMask(); 305 const int xorOpMask = builder.xorMask();
306 SkTDArray<SkOpContour* > contourList; 306 SkTDArray<SkOpContour* > contourList;
307 MakeContourList(&contour, contourList, xorMask == kEvenOdd_PathOpsMask, 307 MakeContourList(&contour, contourList, xorMask == kEvenOdd_PathOpsMask,
308 xorOpMask == kEvenOdd_PathOpsMask); 308 xorOpMask == kEvenOdd_PathOpsMask);
309 SkOpContour** currentPtr = contourList.begin(); 309 SkOpContour** currentPtr = contourList.begin();
310 if (!currentPtr) { 310 if (!currentPtr) {
311 result->reset(); 311 result->reset();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698