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

Unified Diff: tests/PathOpsBuilderTest.cpp

Issue 1218863005: don't fix winding for empty paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkOpSpan.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsBuilderTest.cpp
diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp
index d36072f07703c7090e616b5fb37342ebb641a9b7..f0aaa139c1c7f60e4603b62efec043abf814e84a 100644
--- a/tests/PathOpsBuilderTest.cpp
+++ b/tests/PathOpsBuilderTest.cpp
@@ -135,3 +135,18 @@ DEF_TEST(BuilderIssue3838_3, reporter) {
int pixelDiff = comparePaths(reporter, __FUNCTION__, path, result);
REPORTER_ASSERT(reporter, pixelDiff == 0);
}
+
+DEF_TEST(BuilderIssue502792_2, reporter) {
+ SkPath path, pathB;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.addRect(0, 0, 1, 1, SkPath::kCW_Direction);
+ path.addRect(2, 2, 3, 3, SkPath::kCW_Direction);
+ pathB.setFillType(SkPath::kEvenOdd_FillType);
+ pathB.addRect(3, 3, 4, 4, SkPath::kCW_Direction);
+ pathB.addRect(3, 3, 4, 4, SkPath::kCW_Direction);
+ SkOpBuilder builder;
+ builder.add(path, kUnion_SkPathOp);
+ builder.add(pathB, kDifference_SkPathOp);
+ SkPath result;
+ builder.resolve(&result);
+}
« no previous file with comments | « src/pathops/SkOpSpan.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698