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"; }