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

Side by Side Diff: src/pathops/SkPathOpsCommon.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/SkOpSegment.cpp ('k') | src/pathops/SkPathOpsConic.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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 check start and end of each contour 439 check start and end of each contour
440 if not the same, record them 440 if not the same, record them
441 match them up 441 match them up
442 connect closest 442 connect closest
443 reassemble contour pieces into new path 443 reassemble contour pieces into new path
444 */ 444 */
445 void Assemble(const SkPathWriter& path, SkPathWriter* simple) { 445 void Assemble(const SkPathWriter& path, SkPathWriter* simple) {
446 SkChunkAlloc allocator(4096); // FIXME: constant-ize, tune 446 SkChunkAlloc allocator(4096); // FIXME: constant-ize, tune
447 SkOpContour contour; 447 SkOpContour contour;
448 SkOpGlobalState globalState(NULL SkDEBUGPARAMS(&contour)); 448 SkOpGlobalState globalState(NULL SkDEBUGPARAMS(&contour));
449 #if DEBUG_SHOW_TEST_NAME
450 SkDebugf("</div>\n");
451 #endif
449 #if DEBUG_PATH_CONSTRUCTION 452 #if DEBUG_PATH_CONSTRUCTION
450 SkDebugf("%s\n", __FUNCTION__); 453 SkDebugf("%s\n", __FUNCTION__);
451 #endif 454 #endif
452 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState); 455 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState);
453 builder.finish(&allocator); 456 builder.finish(&allocator);
454 SkTDArray<const SkOpContour* > runs; // indices of partial contours 457 SkTDArray<const SkOpContour* > runs; // indices of partial contours
455 const SkOpContour* eContour = builder.head(); 458 const SkOpContour* eContour = builder.head();
456 do { 459 do {
457 if (!eContour->count()) { 460 if (!eContour->count()) {
458 continue; 461 continue;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 missingCoincidence(contourList, coincidence, allocator); 713 missingCoincidence(contourList, coincidence, allocator);
711 if (!coincidence->apply()) { 714 if (!coincidence->apply()) {
712 return false; 715 return false;
713 } 716 }
714 } 717 }
715 #if DEBUG_ACTIVE_SPANS 718 #if DEBUG_ACTIVE_SPANS
716 DebugShowActiveSpans(*contourList); 719 DebugShowActiveSpans(*contourList);
717 #endif 720 #endif
718 return true; 721 return true;
719 } 722 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpSegment.cpp ('k') | src/pathops/SkPathOpsConic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698