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

Unified Diff: tests/PathTest.cpp

Issue 14607012: need to clamp all of the cubic points after a chop, in case our finite precision (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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
« src/core/SkEdgeClipper.cpp ('K') | « src/core/SkEdgeClipper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
===================================================================
--- tests/PathTest.cpp (revision 9062)
+++ tests/PathTest.cpp (working copy)
@@ -31,6 +31,20 @@
return SkSurface::NewRaster(info);
}
+// This used to assert in the debug build, as the edges did not all line-up.
+static void test_bad_cubic_crbug234190() {
+ SkPath path;
+ path.moveTo(13.8509f, 3.16858f);
+ path.cubicTo(-2.35893e+08f, -4.21044e+08f,
+ -2.38991e+08f, -4.26573e+08f,
+ -2.41016e+08f, -4.30188e+08f);
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkAutoTUnref<SkSurface> surface(new_surface(84, 88));
+ surface->getCanvas()->drawPath(path, paint);
+}
+
static void test_bad_cubic_crbug229478() {
const SkPoint pts[] = {
{ 4595.91064f, -11596.9873f },
@@ -2377,6 +2391,7 @@
test_clipped_cubic();
test_crbug_170666();
test_bad_cubic_crbug229478();
+ test_bad_cubic_crbug234190();
}
#include "TestClassDef.h"
« src/core/SkEdgeClipper.cpp ('K') | « src/core/SkEdgeClipper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698