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

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

Issue 19183003: path ops near exact (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove unused static function Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkPathOpsQuad.cpp ('k') | src/pathops/SkPathOpsTypes.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 "SkOpEdgeBuilder.h" 8 #include "SkOpEdgeBuilder.h"
9 #include "SkPathOpsCommon.h" 9 #include "SkPathOpsCommon.h"
10 #include "SkPathWriter.h" 10 #include "SkPathWriter.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 AddSelfIntersectTs(current); 178 AddSelfIntersectTs(current);
179 } 179 }
180 SkOpContour* next; 180 SkOpContour* next;
181 do { 181 do {
182 next = *nextPtr++; 182 next = *nextPtr++;
183 } while (AddIntersectTs(current, next) && nextPtr != listEnd); 183 } while (AddIntersectTs(current, next) && nextPtr != listEnd);
184 } while (currentPtr != listEnd); 184 } while (currentPtr != listEnd);
185 // eat through coincident edges 185 // eat through coincident edges
186 CoincidenceCheck(&contourList, 0); 186 CoincidenceCheck(&contourList, 0);
187 FixOtherTIndex(&contourList); 187 FixOtherTIndex(&contourList);
188 CheckEnds(&contourList);
188 SortSegments(&contourList); 189 SortSegments(&contourList);
189 #if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY 190 #if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY
190 DebugShowActiveSpans(contourList); 191 DebugShowActiveSpans(contourList);
191 #endif 192 #endif
192 // construct closed contours 193 // construct closed contours
193 SkPathWriter simple(*result); 194 SkPathWriter simple(*result);
194 if (builder.xorMask() == kWinding_PathOpsMask ? bridgeWinding(contourList, & simple) 195 if (builder.xorMask() == kWinding_PathOpsMask ? bridgeWinding(contourList, & simple)
195 : !bridgeXor(contourList, &simple)) 196 : !bridgeXor(contourList, &simple))
196 { // if some edges could not be resolved, assemble remaining fragments 197 { // if some edges could not be resolved, assemble remaining fragments
197 SkPath temp; 198 SkPath temp;
198 temp.setFillType(fillType); 199 temp.setFillType(fillType);
199 SkPathWriter assembled(temp); 200 SkPathWriter assembled(temp);
200 Assemble(simple, &assembled); 201 Assemble(simple, &assembled);
201 *result = *assembled.nativePath(); 202 *result = *assembled.nativePath();
202 result->setFillType(fillType); 203 result->setFillType(fillType);
203 } 204 }
204 return true; 205 return true;
205 } 206 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsQuad.cpp ('k') | src/pathops/SkPathOpsTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698