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

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

Issue 1126193004: fix path op builder (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 | tests/PathOpsBuilderTest.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 2014 Google Inc. 2 * Copyright 2014 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 7
8 #include "SkMatrix.h" 8 #include "SkMatrix.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkPathOps.h" 10 #include "SkPathOps.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 SkPath sum; 78 SkPath sum;
79 for (int index = 0; index < count; ++index) { 79 for (int index = 0; index < count; ++index) {
80 if (!Simplify(fPathRefs[index], &fPathRefs[index])) { 80 if (!Simplify(fPathRefs[index], &fPathRefs[index])) {
81 reset(); 81 reset();
82 *result = original; 82 *result = original;
83 return false; 83 return false;
84 } 84 }
85 sum.addPath(fPathRefs[index]); 85 sum.addPath(fPathRefs[index]);
86 } 86 }
87 reset(); 87 reset();
88 sum.setFillType(SkPath::kEvenOdd_FillType);
88 bool success = Simplify(sum, result); 89 bool success = Simplify(sum, result);
89 if (!success) { 90 if (!success) {
90 *result = original; 91 *result = original;
91 } 92 }
92 return success; 93 return success;
93 } 94 }
OLDNEW
« no previous file with comments | « no previous file | tests/PathOpsBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698