diff options
author | Brian Osman <brianosman@google.com> | 2017-06-27 13:23:18 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-27 19:08:47 +0000 |
commit | 515ccafc98d5b26f39f913a6a9606a0dac5c514f (patch) | |
tree | 2d5f7846d25fa70cd6fe096a4098e5feb63633e2 | |
parent | 47ac02467bd17517c4616b9026b8f3790d07eb97 (diff) |
Adjust path_stroke_with_zero_length to draw on pixel centers
Bug: skia:
Change-Id: I1183574de4e3a429fe00c5a6a0f71745f1f6f5b4
Reviewed-on: https://skia-review.googlesource.com/20969
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r-- | gm/path_stroke_with_zero_length.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gm/path_stroke_with_zero_length.cpp b/gm/path_stroke_with_zero_length.cpp index f21d624bbd..803a801d92 100644 --- a/gm/path_stroke_with_zero_length.cpp +++ b/gm/path_stroke_with_zero_length.cpp @@ -84,6 +84,9 @@ protected: bkgrnd.setColor(SK_ColorWHITE); canvas->drawRect(SkRect::MakeIWH(onISize().fWidth, onISize().fHeight), bkgrnd); + // Move to pixel centers. The non-AA parts of this test are really poorly defined otherwise. + canvas->translate(0.5f, 0.5f); + auto drawPaths = [&](SkPaint& paint, int indexMask) { canvas->translate(0, 30.0f); int index = 0; |