diff options
author | 2016-11-21 10:51:09 -0500 | |
---|---|---|
committer | 2016-11-21 16:23:34 +0000 | |
commit | 8d5f9cb5e7ea3d9ce77715a7f730f1c36222ae16 (patch) | |
tree | 5441377cd63404ae9277e4e127e4716054a22444 /src | |
parent | 99bba9ea829323a7941d4f3a9c98da7a76432d1b (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp index a9ef6cdb0e..9f4274ddee 100644 --- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp @@ -145,6 +145,11 @@ public: // 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"; } |