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

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

Issue 1102273003: fix valgrind (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | src/pathops/SkPathOpsSimplify.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SkPoint lastTopLeft;
108 SkPoint topLeft = {SK_ScalarMin, SK_ScalarMin}; 108 SkPoint topLeft = {SK_ScalarMin, SK_ScalarMin};
109 do { 109 do {
110 SkOpSpanBase* start; 110 SkOpSpanBase* start = NULL;
111 SkOpSpanBase* end; 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) {
119 if ((!topUnsortable || firstPass) && !topDone) { 119 if ((!topUnsortable || firstPass) && !topDone) {
120 SkASSERT(topLeft.fX != SK_ScalarMin && topLeft.fY != SK_ScalarMi n); 120 SkASSERT(topLeft.fX != SK_ScalarMin && topLeft.fY != SK_ScalarMi n);
121 if (lastTopLeft.fX == SK_ScalarMin && lastTopLeft.fY == SK_Scala rMin) { 121 if (lastTopLeft.fX == SK_ScalarMin && lastTopLeft.fY == SK_Scala rMin) {
(...skipping 221 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 | « no previous file | src/pathops/SkPathOpsSimplify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698