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

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

Issue 1107353004: align top and bounds computations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up code Created 5 years, 7 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.h ('k') | src/pathops/SkPathOpsQuad.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 return NULL; 98 return NULL;
99 } 99 }
100 100
101 static bool bridgeOp(SkTDArray<SkOpContour* >& contourList, const SkPathOp op, 101 static bool bridgeOp(SkTDArray<SkOpContour* >& contourList, const SkPathOp op,
102 const int xorMask, const int xorOpMask, SkPathWriter* simple, SkChunkAll oc* allocator) { 102 const int xorMask, const int xorOpMask, SkPathWriter* simple, SkChunkAll oc* allocator) {
103 bool firstContour = true; 103 bool firstContour = true;
104 bool unsortable = false; 104 bool unsortable = false;
105 bool topUnsortable = false; 105 bool topUnsortable = false;
106 bool firstPass = true; 106 bool firstPass = true;
107 SkPoint lastTopLeft; 107 SkDPoint lastTopLeft;
108 SkPoint topLeft = {SK_ScalarMin, SK_ScalarMin}; 108 SkDPoint topLeft = {SK_ScalarMin, SK_ScalarMin};
109 do { 109 do {
110 SkOpSpanBase* start = NULL; 110 SkOpSpanBase* start = NULL;
111 SkOpSpanBase* end = NULL; 111 SkOpSpanBase* end = NULL;
112 bool topDone; 112 bool topDone;
113 bool onlyVertical = false; 113 bool onlyVertical = false;
114 lastTopLeft = topLeft; 114 lastTopLeft = topLeft;
115 SkOpSegment* current = FindSortableTop(contourList, firstPass, SkOpAngle ::kBinarySingle, 115 SkOpSegment* current = FindSortableTop(contourList, firstPass, SkOpAngle ::kBinarySingle,
116 &firstContour, &start, &end, &topLeft, &topUnsortable, &topDone, &onlyVertical, 116 &firstContour, &start, &end, &topLeft, &topUnsortable, &topDone, &onlyVertical,
117 allocator); 117 allocator);
118 if (!current) { 118 if (!current) {
(...skipping 224 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.h ('k') | src/pathops/SkPathOpsQuad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698