diff options
author | Stephen White <senorblanco@chromium.org> | 2018-06-22 10:19:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-22 15:27:57 +0000 |
commit | 13f3d8d4bc6863c7d890781021555fb6f65936e0 (patch) | |
tree | 07d19a327907c47f351c7839f6e2d8eae3ee961a /tests/TessellatingPathRendererTests.cpp | |
parent | b9177cfaa8f56cc2f561669dc4e68cf6d43f529d (diff) |
GrTessellator: avoid split with zero primary and out-of-range secondary.
Sometimes the intersector will return an intersection which is on the
same primary sort criterion (eg., Y coordinate), but out-of-range on the
secondary. We shouldn't do splits in this case. The only case we really
care about is if it's less than one epsilon and greater than zero,
and thus numerically unsplittable.
Bug: 851914
Change-Id: Ia772763b6a66a14ca159cf409a832835244e83bc
Reviewed-on: https://skia-review.googlesource.com/136803
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'tests/TessellatingPathRendererTests.cpp')
-rw-r--r-- | tests/TessellatingPathRendererTests.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index 6f2d8963dc..0b30feecc0 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp @@ -546,6 +546,20 @@ static SkPath create_path_37() { return path; } +// Reduction from crbug.com/851914. +static SkPath create_path_38() { + SkPath path; + path.moveTo(14.400531768798828125, 17.711114883422851562); + path.lineTo(14.621990203857421875, 171563104293879808); + path.lineTo(14.027951240539550781, 872585759381520384); + path.lineTo( 14.0216827392578125, 872665817571917824); + path.lineTo(7.699314117431640625, -3417320793833472); + path.moveTo(11.606547355651855469, 17.40966796875); + path.lineTo( 7642114886926860288, 21.08358001708984375); + path.lineTo(11.606547355651855469, 21.08358001708984375); + return path; +} + static std::unique_ptr<GrFragmentProcessor> create_linear_gradient_processor(GrContext* ctx) { SkPoint pts[2] = { {0, 0}, {1, 1} }; @@ -643,4 +657,5 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { test_path(ctx, rtc.get(), create_path_35()); test_path(ctx, rtc.get(), create_path_36()); test_path(ctx, rtc.get(), create_path_37()); + test_path(ctx, rtc.get(), create_path_38(), SkMatrix(), GrAAType::kCoverage); } |