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

Unified Diff: tests/TessellatingPathRendererTests.cpp

Issue 2259493002: Fix assert caused by floating point error in tessellating path renderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/gpu/GrTessellator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TessellatingPathRendererTests.cpp
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index d9afcc4d3d798d76595d572a00cc161112d89159..232ea36db659d0791a629da8ce83ea78dcee3037 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -232,6 +232,23 @@ static SkPath create_path_15() {
return path;
}
+// Reduction of Nebraska-StateSeal.svg. Floating point error causes the
+// same edge to be added to more than one poly on the same side.
+static SkPath create_path_16() {
+ SkPath path;
+ path.moveTo(170.8199920654296875, 491.86700439453125);
+ path.lineTo(173.7649993896484375, 489.7340087890625);
+ path.lineTo(174.1450958251953125, 498.545989990234375);
+ path.lineTo( 171.998992919921875, 500.88201904296875);
+ path.moveTo(168.2922515869140625, 498.66265869140625);
+ path.lineTo(169.8589935302734375, 497.94500732421875);
+ path.lineTo( 172, 500.88299560546875);
+ path.moveTo( 169.555267333984375, 490.70111083984375);
+ path.lineTo(173.7649993896484375, 489.7340087890625);
+ path.lineTo( 170.82000732421875, 491.86700439453125);
+ return path;
+}
+
static void test_path(GrDrawContext* drawContext, GrResourceProvider* rp, const SkPath& path) {
GrTessellatingPathRenderer tess;
@@ -284,5 +301,6 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) {
test_path(dc.get(), rp, create_path_13());
test_path(dc.get(), rp, create_path_14());
test_path(dc.get(), rp, create_path_15());
+ test_path(dc.get(), rp, create_path_16());
}
#endif
« no previous file with comments | « src/gpu/GrTessellator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698