commit | 51161b59e0097ca535d5ce5bc5a4ab04c8765a39 | [log] [tgz] |
---|---|---|
author | Brian Salomon <bsalomon@google.com> | Mon Nov 28 10:48:45 2016 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Mon Nov 28 15:52:04 2016 +0000 |
tree | fdaaded8dfdb0640efb496ac6d7a20ae9795f3a3 | |
parent | 71bbd67b5ad911269b9582f6c20cc0cc2de1a02f [diff] |
Add an extra pixel to the distance field path renderer bounds. BUG=chromium:663701 BUG=skia:5989 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5086 Change-Id: Ie97f46b108f54c711c5928b11a9921be38356f8d Reviewed-on: https://skia-review.googlesource.com/5086 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Cherry-pick to M55 NOTREECHECKS=true NOTRY=true NOPRESUBMIT=true Change-Id: I3f8e5de782846447c6f809c3284c5081b5d7a283 Reviewed-on: https://skia-review.googlesource.com/5267 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp index 36a9ff0..db72db3 100644 --- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
@@ -146,6 +146,11 @@ // Compute bounds this->setTransformedBounds(shape.bounds(), viewMatrix, HasAABloat::kYes, IsZeroArea::kNo); + // There is currently an issue where we may produce 2 pixels worth of AA around the path. + // A workaround is to outset the bounds by 1 in device space. (skbug.com/5989) + SkRect bounds = this->bounds(); + bounds.outset(1.f, 1.f); + this->setBounds(bounds, HasAABloat::kYes, IsZeroArea::kNo); } const char* name() const override { return "AADistanceFieldPathBatch"; }