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

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

Issue 1250293002: fix path ops fuzz buster (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: corrupting bug kaput Created 5 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
« no previous file with comments | « src/pathops/SkPathOpsOp.cpp ('k') | src/pathops/SkPathOpsTightBounds.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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (result != &path) { 160 if (result != &path) {
161 *result = path; 161 *result = path;
162 } 162 }
163 result->setFillType(fillType); 163 result->setFillType(fillType);
164 return true; 164 return true;
165 } 165 }
166 // turn path into list of segments 166 // turn path into list of segments
167 SkOpCoincidence coincidence; 167 SkOpCoincidence coincidence;
168 SkOpContour contour; 168 SkOpContour contour;
169 SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour); 169 SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour);
170 SkOpGlobalState globalState(&coincidence, contourList); 170 SkOpGlobalState globalState(&coincidence, contourList SkDEBUGPARAMS(NULL));
171 #if DEBUG_SORT 171 #if DEBUG_SORT
172 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault; 172 SkPathOpsDebug::gSortCount = SkPathOpsDebug::gSortCountDefault;
173 #endif 173 #endif
174 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState); 174 SkOpEdgeBuilder builder(path, &contour, &allocator, &globalState);
175 if (!builder.finish(&allocator)) { 175 if (!builder.finish(&allocator)) {
176 return false; 176 return false;
177 } 177 }
178 #if DEBUG_DUMP_SEGMENTS 178 #if DEBUG_DUMP_SEGMENTS
179 contour.dumpSegments((SkPathOp) -1); 179 contour.dumpSegments((SkPathOp) -1);
180 #endif 180 #endif
(...skipping 25 matching lines...) Expand all
206 SkPath temp; 206 SkPath temp;
207 temp.setFillType(fillType); 207 temp.setFillType(fillType);
208 SkPathWriter assembled(temp); 208 SkPathWriter assembled(temp);
209 Assemble(wrapper, &assembled); 209 Assemble(wrapper, &assembled);
210 *result = *assembled.nativePath(); 210 *result = *assembled.nativePath();
211 result->setFillType(fillType); 211 result->setFillType(fillType);
212 } 212 }
213 return true; 213 return true;
214 } 214 }
215 215
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsOp.cpp ('k') | src/pathops/SkPathOpsTightBounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698