aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TessellatingPathRendererTests.cpp
diff options
context:
space:
mode:
authorGravatar Stephen White <senorblanco@chromium.org>2018-06-05 18:45:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-06 15:01:41 +0000
commite62999f6efcffb12eff9502ec3603a3ed50b6e32 (patch)
treeba7f8988a6765ae93bdc66dfe912a75e4068afba /tests/TessellatingPathRendererTests.cpp
parente2aa7b6a554a92047b8426a7dddd0cf127fa1238 (diff)
GrTessellator: yet another out-of-range splitting fix.
It's actually possible for an intersection to be out-of-range on both the intersected edges (e.g., below both bottom points), because floating point. So we need to clamp against both edges. Bug: 846014 Change-Id: I9fe25a1fcd3b5242af7b1ee36b17f1e968aeb836 Reviewed-on: https://skia-review.googlesource.com/132323 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'tests/TessellatingPathRendererTests.cpp')
-rw-r--r--tests/TessellatingPathRendererTests.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index 6e5d12eee6..6ab76b0d88 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -524,6 +524,17 @@ static SkPath create_path_35() {
return path;
}
+// Reduction from crbug.com/843135 where an intersection is found
+// below the bottom of both intersected edges.
+static SkPath create_path_36() {
+ SkPath path;
+ path.moveTo(-2791476679359332352, 2608107002026524672);
+ path.lineTo( 0, 11.95427703857421875);
+ path.lineTo(-2781824066779086848, 2599088532777598976);
+ path.lineTo( -7772.6875, 7274);
+ return path;
+}
+
static std::unique_ptr<GrFragmentProcessor> create_linear_gradient_processor(GrContext* ctx) {
SkPoint pts[2] = { {0, 0}, {1, 1} };
@@ -619,4 +630,5 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) {
test_path(ctx, rtc.get(), create_path_33());
test_path(ctx, rtc.get(), create_path_34());
test_path(ctx, rtc.get(), create_path_35());
+ test_path(ctx, rtc.get(), create_path_36());
}