aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-23 08:30:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-23 13:26:41 +0000
commit3087c1f382f1cd547598dc75f47ccbc8fe1e6e0f (patch)
tree492d99dfb7ad635249286f5299cdcd145489242b /tests
parentb4303caa98d23279a3b5204ac0adbc28d4e33682 (diff)
tweak tolerance again for cubics
Bug: 845489 Bug: skia:7995 Change-Id: I05554377bd5630b7134864b6db282358613f1030 Reviewed-on: https://skia-review.googlesource.com/129721 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ClipCubicTest.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/ClipCubicTest.cpp b/tests/ClipCubicTest.cpp
index 427e753322..ca2f62314d 100644
--- a/tests/ClipCubicTest.cpp
+++ b/tests/ClipCubicTest.cpp
@@ -212,13 +212,23 @@ DEF_TEST(test_fuzz_crbug_698714, reporter) {
canvas->drawPath(path, paint);
}
-DEF_TEST(cubic_scan_error_crbug_844457, reporter) {
+DEF_TEST(cubic_scan_error_crbug_844457_and_845489, reporter) {
auto surface(SkSurface::MakeRasterN32Premul(100, 100));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint p;
SkPath path;
path.moveTo(-30/64.0, -31/64.0);
path.cubicTo(-31/64.0, -31/64,-31/64.0, -31/64,-31/64.0, 100);
- path.lineTo(100,100);
-
- surface->getCanvas()->drawPath(path, SkPaint());
+ path.lineTo(100, 100);
+ canvas->drawPath(path, p);
+
+ // May need to define SK_RASTERIZE_EVEN_ROUNDING to trigger the need for this test
+ path.reset();
+ path.moveTo(-30/64.0f, -31/64.0f + 1/256.0f);
+ path.cubicTo(-31/64.0f + 1/256.0f, -31/64.0f + 1/256.0f,
+ -31/64.0f + 1/256.0f, -31/64.0f + 1/256.0f,
+ -31/64.0f + 1/256.0f, 100);
+ path.lineTo(100, 100);
+ canvas->drawPath(path, p);
}