From e62999f6efcffb12eff9502ec3603a3ed50b6e32 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Tue, 5 Jun 2018 18:45:07 -0400 Subject: 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 Commit-Queue: Stephen White --- tests/TessellatingPathRendererTests.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/TessellatingPathRendererTests.cpp') 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 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()); } -- cgit v1.2.3