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

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

Issue 255893002: one more tsan fix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | src/pathops/SkPathOpsDebug.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 "SkGeometry.h" 7 #include "SkGeometry.h"
8 #include "SkOpEdgeBuilder.h" 8 #include "SkOpEdgeBuilder.h"
9 #include "SkReduceOrder.h" 9 #include "SkReduceOrder.h"
10 10
11 void SkOpEdgeBuilder::init() { 11 void SkOpEdgeBuilder::init() {
12 fCurrentContour = NULL; 12 fCurrentContour = NULL;
13 fOperand = false; 13 fOperand = false;
14 fXorMask[0] = fXorMask[1] = (fPath->getFillType() & 1) ? kEvenOdd_PathOpsMas k 14 fXorMask[0] = fXorMask[1] = (fPath->getFillType() & 1) ? kEvenOdd_PathOpsMas k
15 : kWinding_PathOpsMask; 15 : kWinding_PathOpsMask;
16 #if defined(SK_DEBUG) || !FORCE_RELEASE
17 SkPathOpsDebug::gContourID = 0;
18 SkPathOpsDebug::gSegmentID = 0;
19 #endif
20 fUnparseable = false; 16 fUnparseable = false;
21 fSecondHalf = preFetch(); 17 fSecondHalf = preFetch();
22 } 18 }
23 19
24 void SkOpEdgeBuilder::addOperand(const SkPath& path) { 20 void SkOpEdgeBuilder::addOperand(const SkPath& path) {
25 SkASSERT(fPathVerbs.count() > 0 && fPathVerbs.end()[-1] == SkPath::kDone_Ver b); 21 SkASSERT(fPathVerbs.count() > 0 && fPathVerbs.end()[-1] == SkPath::kDone_Ver b);
26 fPathVerbs.pop_back(); 22 fPathVerbs.pop_back();
27 fPath = &path; 23 fPath = &path;
28 fXorMask[1] = (fPath->getFillType() & 1) ? kEvenOdd_PathOpsMask 24 fXorMask[1] = (fPath->getFillType() & 1) ? kEvenOdd_PathOpsMask
29 : kWinding_PathOpsMask; 25 : kWinding_PathOpsMask;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return false; 181 return false;
186 } 182 }
187 pointsPtr += SkPathOpsVerbToPoints(verb); 183 pointsPtr += SkPathOpsVerbToPoints(verb);
188 SkASSERT(fCurrentContour); 184 SkASSERT(fCurrentContour);
189 } 185 }
190 if (fCurrentContour && !fAllowOpenContours && !close()) { 186 if (fCurrentContour && !fAllowOpenContours && !close()) {
191 return false; 187 return false;
192 } 188 }
193 return true; 189 return true;
194 } 190 }
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698