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

Unified Diff: tests/PathOpsBuilderTest.cpp

Issue 1129863007: look for deleted pts when detecting line/curve coincident edges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix path op builder 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | tests/PathOpsIssue3651.cpp » ('j') | 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 c93931d3b25a19596fbd5e8204a431fc572588be..0f35e8fd072ef9e8ff4f4f81e08768ae98f7a86f 100644
--- a/tests/PathOpsBuilderTest.cpp
+++ b/tests/PathOpsBuilderTest.cpp
@@ -78,3 +78,29 @@ DEF_TEST(PathOpsBuilder, reporter) {
int pixelDiff = comparePaths(reporter, __FUNCTION__, opCompare, result, bitmap);
REPORTER_ASSERT(reporter, pixelDiff == 0);
}
+
+DEF_TEST(Issue3838, reporter) {
+ SkPath path;
+ path.moveTo(200, 170);
+ path.lineTo(220, 170);
+ path.lineTo(220, 230);
+ path.lineTo(240, 230);
+ path.lineTo(240, 210);
+ path.lineTo(180, 210);
+ path.lineTo(180, 190);
+ path.lineTo(260, 190);
+ path.lineTo(260, 250);
+ path.lineTo(200, 250);
+ path.lineTo(200, 170);
+ path.close();
+ testSimplify(reporter, path, __FUNCTION__);
+ SkPath path3;
+ Simplify(path, &path3);
+ SkPath path2;
+ SkOpBuilder builder;
+ builder.add(path, kUnion_SkPathOp);
+ builder.resolve(&path2);
+ SkBitmap bitmap;
+ int pixelDiff = comparePaths(reporter, __FUNCTION__, path, path2, bitmap);
+ REPORTER_ASSERT(reporter, pixelDiff == 0);
+}
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | tests/PathOpsIssue3651.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698