diff options
author | Stephen White <senorblanco@chromium.org> | 2018-07-16 13:31:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-16 17:57:19 +0000 |
commit | 71ed661963ba57200e6f9b3d5ad64105b607bb98 (patch) | |
tree | 7faa1e2573cf7621f365e16b4253b7373e3609ce /tests | |
parent | b983e6baa1db462a047e14ed83be759f2361838c (diff) |
GrTessellator: collinear edges during sanitize.
When three collinear edges occur during the sanitize_contours() pass,
their vertices may not yet have been discovered to be coincident. So
we must do the vertex comparison by point, rather than by pointer.
Bug: 860655
Change-Id: I89dc7526905bb5473206661348fee431371731a0
Reviewed-on: https://skia-review.googlesource.com/141523
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TessellatingPathRendererTests.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index 4b3b321f17..ae20171b04 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp @@ -600,6 +600,22 @@ static SkPath create_path_41() { return path; } +// Reduction from crbug.com/860655. Cause is three collinear edges discovered during +// sanitize_contours pass, before the vertices have been found coincident. +static SkPath create_path_42() { + SkPath path; + path.moveTo( 32572426382475264, -3053391034974208); + path.lineTo( 521289856, -48865776); + path.lineTo( 130322464, -12215873); + path.moveTo( 32572426382475264, -3053391034974208); + path.lineTo( 521289856, -48865776); + path.lineTo( 130322464, -12215873); + path.moveTo( 32572426382475264, -3053391034974208); + path.lineTo( 32114477642022912, -3010462031544320); + path.lineTo( 32111784697528320, -3010209702215680); + return path; +} + static std::unique_ptr<GrFragmentProcessor> create_linear_gradient_processor(GrContext* ctx) { SkPoint pts[2] = { {0, 0}, {1, 1} }; @@ -701,4 +717,5 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { test_path(ctx, rtc.get(), create_path_39()); test_path(ctx, rtc.get(), create_path_40()); test_path(ctx, rtc.get(), create_path_41(), SkMatrix(), GrAAType::kCoverage); + test_path(ctx, rtc.get(), create_path_42()); } |