From 515ccafc98d5b26f39f913a6a9606a0dac5c514f Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Tue, 27 Jun 2017 13:23:18 -0400 Subject: 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 Commit-Queue: Brian Osman --- gm/path_stroke_with_zero_length.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3