diff options
author | Mike Reed <reed@google.com> | 2018-01-16 13:58:01 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-16 20:36:09 +0000 |
commit | 23e0cf29639459fb8695bf8174d82ae47fd0d0bb (patch) | |
tree | 091d1ac4b2d6096a68b66a6148009414d08ff10a /gm/hugepath.cpp | |
parent | 3d1869453e90954f4b8b76d122e7795039dfb8c5 (diff) |
relax path bounds check
Revert of https://skia-review.googlesource.com/c/skia/+/94100
Reduced the "big" value by the amount we super-sample shift
Bug: skia:
Change-Id: I7b37b7db841312b0863f76cb353cc916aff1cfa8
Reviewed-on: https://skia-review.googlesource.com/94801
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'gm/hugepath.cpp')
-rw-r--r-- | gm/hugepath.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/gm/hugepath.cpp b/gm/hugepath.cpp index dbca413093..83dff9ec3e 100644 --- a/gm/hugepath.cpp +++ b/gm/hugepath.cpp @@ -9,20 +9,29 @@ #include "SkCanvas.h" #include "SkPath.h" -DEF_SIMPLE_GM(path_huge_crbug_800804, canvas, 30, 600) { +DEF_SIMPLE_GM(path_huge_crbug_800804, canvas, 50, 600) { SkPaint paint; paint.setAntiAlias(true); - paint.setStyle(SkPaint::kStroke_Style); - paint.setStrokeWidth(1); + + // exercise various special-cases (e.g. hairlines or not) + const float widths[] = { 0.9f, 1.0f, 1.1f }; + SkPath path; - path.moveTo(-1000,12345678901234567890.f); - path.lineTo(10.5f,200); - canvas->drawPath(path, paint); - - path.reset(); - path.moveTo(20.5f,400); - path.lineTo(1000,-9.8765432109876543210e+19f); - canvas->drawPath(path, paint); + for (float w : widths) { + paint.setStrokeWidth(w); + + path.reset(); + path.moveTo(-1000,12345678901234567890.f); + path.lineTo(10.5f,200); + canvas->drawPath(path, paint); + + path.reset(); + path.moveTo(30.5f,400); + path.lineTo(1000,-9.8765432109876543210e+19f); + canvas->drawPath(path, paint); + + canvas->translate(3, 0); + } } |