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

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

Issue 1867053002: Appease valgrind wrt testing code initialization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 4 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 | « include/gpu/GrTestUtils.h ('k') | tests/PathOpsSimplifyRectThreadedTest.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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 if (!HandleCoincidence(contourList, &coincidence, &allocator)) { 209 if (!HandleCoincidence(contourList, &coincidence, &allocator)) {
210 return false; 210 return false;
211 } 211 }
212 #if DEBUG_DUMP_ALIGNMENT 212 #if DEBUG_DUMP_ALIGNMENT
213 contour.dumpSegments("aligned"); 213 contour.dumpSegments("aligned");
214 #endif 214 #endif
215 // construct closed contours 215 // construct closed contours
216 result->reset(); 216 result->reset();
217 result->setFillType(fillType); 217 result->setFillType(fillType);
218 SkPathWriter wrapper(*result); 218 SkPathWriter wrapper(*result);
219 bool closable; 219 bool closable SK_INIT_TO_AVOID_WARNING;
220 if (builder.xorMask() == kWinding_PathOpsMask 220 if (builder.xorMask() == kWinding_PathOpsMask
221 ? !bridgeWinding(contourList, &wrapper, &allocator, &closable) 221 ? !bridgeWinding(contourList, &wrapper, &allocator, &closable)
222 : !bridgeXor(contourList, &wrapper, &allocator, &closable)) { 222 : !bridgeXor(contourList, &wrapper, &allocator, &closable)) {
223 return false; 223 return false;
224 } 224 }
225 if (!closable) 225 if (!closable)
226 { // if some edges could not be resolved, assemble remaining fragments 226 { // if some edges could not be resolved, assemble remaining fragments
227 SkPath temp; 227 SkPath temp;
228 temp.setFillType(fillType); 228 temp.setFillType(fillType);
229 SkPathWriter assembled(temp); 229 SkPathWriter assembled(temp);
230 Assemble(wrapper, &assembled); 230 Assemble(wrapper, &assembled);
231 *result = *assembled.nativePath(); 231 *result = *assembled.nativePath();
232 result->setFillType(fillType); 232 result->setFillType(fillType);
233 } 233 }
234 return true; 234 return true;
235 } 235 }
236 236
OLDNEW
« no previous file with comments | « include/gpu/GrTestUtils.h ('k') | tests/PathOpsSimplifyRectThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698