aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Stephen White <senorblanco@chromium.org>2018-01-04 16:45:51 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-05 18:08:30 +0000
commitf470b7ecf0ad3910e96414a3d93db61c422ba917 (patch)
tree3328aa0c508ad5868252a287c0d158afbf9da7fa /tests
parent8fb3725acfc618c85b02ddf8114c40048e1fcba7 (diff)
GrTessellator: fix for assert on bevelling.
With some large values, intersection for bevelling will fail. These should just skip the point, not assert. BUG=798912 Change-Id: Ie5c8cc3c9387055e1e31480321a231f0e6ff153b Reviewed-on: https://skia-review.googlesource.com/91141 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/TessellatingPathRendererTests.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index 6368c47ad4..02db8d8a58 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -406,7 +406,6 @@ static SkPath create_path_26() {
return path;
}
-
// A path which results in non-finite points when stroked and bevelled for AA.
static SkPath create_path_27() {
SkPath path;
@@ -417,6 +416,18 @@ static SkPath create_path_27() {
path.lineTo(2.0473912312177548811e+37, 4.2146815465123165435e+36);
return path;
}
+
+// AA stroking this path produces intersection failures on bevelling.
+// This should skip the point, but not assert.
+static SkPath create_path_28() {
+ SkPath path;
+ path.moveTo(-7.5952312625177475154e+21, -2.6819185100266674911e+24);
+ path.lineTo( 1260.3787841796875, 1727.7947998046875);
+ path.lineTo( 1260.5567626953125, 1728.0386962890625);
+ path.lineTo(1.1482511310557754163e+21, 4.054538502765980051e+23);
+ path.lineTo(-7.5952312625177475154e+21, -2.6819185100266674911e+24);
+ return path;
+}
static std::unique_ptr<GrFragmentProcessor> create_linear_gradient_processor(GrContext* ctx) {
SkPoint pts[2] = { {0, 0}, {1, 1} };
@@ -507,5 +518,6 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) {
test_path(ctx, rtc.get(), create_path_25(), SkMatrix(), GrAAType::kCoverage);
test_path(ctx, rtc.get(), create_path_26(), SkMatrix(), GrAAType::kCoverage);
test_path(ctx, rtc.get(), create_path_27(), SkMatrix(), GrAAType::kCoverage);
+ test_path(ctx, rtc.get(), create_path_28(), SkMatrix(), GrAAType::kCoverage);
}
#endif