fix clamping when we chop a cubic
Review URL: https://codereview.appspot.com/6039048
git-svn-id: http://skia.googlecode.com/svn/trunk@3691 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index f0556c2..9bbb88f 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -25,6 +25,8 @@
return create(SkBitmap::kARGB_8888_Config, w, h, 0, NULL);
}
+///////////////////////////////////////////////////////////////////////////////
+
static void test_bug533(skiatest::Reporter* reporter) {
#ifdef SK_SCALAR_IS_FLOAT
/*
@@ -44,6 +46,20 @@
#endif
}
+static void test_bigcubic(skiatest::Reporter* reporter) {
+#ifdef SK_SCALAR_IS_FLOAT
+ SkPath path;
+ path.moveTo(64, 3);
+ path.cubicTo(-329936, -100000000, -329936, 100000000, 1153, 330003);
+
+ SkPaint paint;
+ paint.setAntiAlias(true);
+
+ SkAutoTUnref<SkCanvas> canvas(new_canvas(640, 480));
+ canvas.get()->drawPath(path, paint);
+#endif
+}
+
// we used to assert if the bounds of the device (clip) was larger than 32K
// even when the path itself was smaller. We just draw and hope in the debug
// version to not assert.
@@ -63,6 +79,7 @@
static void TestDrawPath(skiatest::Reporter* reporter) {
test_giantaa(reporter);
test_bug533(reporter);
+ test_bigcubic(reporter);
}
#include "TestClassDef.h"