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 "PathOpsExtendedTest.h" | 8 #include "PathOpsExtendedTest.h" |
9 #include "PathOpsTestCommon.h" | 9 #include "PathOpsTestCommon.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 path.lineTo(59, 11); | 128 path.lineTo(59, 11); |
129 path.lineTo(41, 11); | 129 path.lineTo(41, 11); |
130 | 130 |
131 SkOpBuilder builder; | 131 SkOpBuilder builder; |
132 builder.add(path, kUnion_SkPathOp); | 132 builder.add(path, kUnion_SkPathOp); |
133 SkPath result; | 133 SkPath result; |
134 builder.resolve(&result); | 134 builder.resolve(&result); |
135 int pixelDiff = comparePaths(reporter, __FUNCTION__, path, result); | 135 int pixelDiff = comparePaths(reporter, __FUNCTION__, path, result); |
136 REPORTER_ASSERT(reporter, pixelDiff == 0); | 136 REPORTER_ASSERT(reporter, pixelDiff == 0); |
137 } | 137 } |
| 138 |
| 139 DEF_TEST(BuilderIssue502792_2, reporter) { |
| 140 SkPath path, pathB; |
| 141 path.setFillType(SkPath::kWinding_FillType); |
| 142 path.addRect(0, 0, 1, 1, SkPath::kCW_Direction); |
| 143 path.addRect(2, 2, 3, 3, SkPath::kCW_Direction); |
| 144 pathB.setFillType(SkPath::kEvenOdd_FillType); |
| 145 pathB.addRect(3, 3, 4, 4, SkPath::kCW_Direction); |
| 146 pathB.addRect(3, 3, 4, 4, SkPath::kCW_Direction); |
| 147 SkOpBuilder builder; |
| 148 builder.add(path, kUnion_SkPathOp); |
| 149 builder.add(pathB, kDifference_SkPathOp); |
| 150 SkPath result; |
| 151 builder.resolve(&result); |
| 152 } |
OLD | NEW |