| OLD | NEW |
| 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 "SkOpEdgeBuilder.h" | 9 #include "SkOpEdgeBuilder.h" |
| 10 #include "SkPathPriv.h" | 10 #include "SkPathPriv.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 reset(); | 151 reset(); |
| 152 return true; | 152 return true; |
| 153 } | 153 } |
| 154 SkPath sum; | 154 SkPath sum; |
| 155 for (int index = 0; index < count; ++index) { | 155 for (int index = 0; index < count; ++index) { |
| 156 if (!Simplify(fPathRefs[index], &fPathRefs[index])) { | 156 if (!Simplify(fPathRefs[index], &fPathRefs[index])) { |
| 157 reset(); | 157 reset(); |
| 158 *result = original; | 158 *result = original; |
| 159 return false; | 159 return false; |
| 160 } | 160 } |
| 161 // convert the even odd result back to winding form before accumulating
it | 161 if (!fPathRefs[index].isEmpty()) { |
| 162 FixWinding(&fPathRefs[index]); | 162 // convert the even odd result back to winding form before accumulat
ing it |
| 163 sum.addPath(fPathRefs[index]); | 163 FixWinding(&fPathRefs[index]); |
| 164 sum.addPath(fPathRefs[index]); |
| 165 } |
| 164 } | 166 } |
| 165 reset(); | 167 reset(); |
| 166 bool success = Simplify(sum, result); | 168 bool success = Simplify(sum, result); |
| 167 if (!success) { | 169 if (!success) { |
| 168 *result = original; | 170 *result = original; |
| 169 } | 171 } |
| 170 return success; | 172 return success; |
| 171 } | 173 } |
| OLD | NEW |