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

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

Issue 1033803002: Revert of fix destructor order to fix build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/SkOpContour.h ('k') | src/pathops/SkPathOpsOp.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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 }; 433 };
434 434
435 /* 435 /*
436 check start and end of each contour 436 check start and end of each contour
437 if not the same, record them 437 if not the same, record them
438 match them up 438 match them up
439 connect closest 439 connect closest
440 reassemble contour pieces into new path 440 reassemble contour pieces into new path
441 */ 441 */
442 void Assemble(const SkPathWriter& path, SkPathWriter* simple) { 442 void Assemble(const SkPathWriter& path, SkPathWriter* simple) {
443 SkChunkAlloc allocator(4096); // FIXME: constant-ize, tune
444 SkOpContour contour; 443 SkOpContour contour;
445 SkOpGlobalState globalState(NULL PATH_OPS_DEBUG_PARAMS(&contour)); 444 SkOpGlobalState globalState(NULL PATH_OPS_DEBUG_PARAMS(&contour));
446 #if DEBUG_PATH_CONSTRUCTION 445 #if DEBUG_PATH_CONSTRUCTION
447 SkDebugf("%s\n", __FUNCTION__); 446 SkDebugf("%s\n", __FUNCTION__);
448 #endif 447 #endif
448 SkChunkAlloc allocator(4096); // FIXME: constant-ize, tune
449 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState); 449 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState);
450 builder.finish(&allocator); 450 builder.finish(&allocator);
451 SkTDArray<const SkOpContour* > runs; // indices of partial contours 451 SkTDArray<const SkOpContour* > runs; // indices of partial contours
452 const SkOpContour* eContour = builder.head(); 452 const SkOpContour* eContour = builder.head();
453 do { 453 do {
454 if (!eContour->count()) { 454 if (!eContour->count()) {
455 continue; 455 continue;
456 } 456 }
457 const SkPoint& eStart = eContour->start(); 457 const SkPoint& eStart = eContour->start();
458 const SkPoint& eEnd = eContour->end(); 458 const SkPoint& eEnd = eContour->end();
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 missingCoincidence(contourList, coincidence, allocator); 707 missingCoincidence(contourList, coincidence, allocator);
708 if (!coincidence->apply()) { 708 if (!coincidence->apply()) {
709 return false; 709 return false;
710 } 710 }
711 } 711 }
712 #if DEBUG_ACTIVE_SPANS 712 #if DEBUG_ACTIVE_SPANS
713 DebugShowActiveSpans(*contourList); 713 DebugShowActiveSpans(*contourList);
714 #endif 714 #endif
715 return true; 715 return true;
716 } 716 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkPathOpsOp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698