Index: src/gpu/batches/GrTessellatingPathRenderer.cpp |
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp |
index 901d38369cfe072496a306b063544a8846a98b39..a3a888302a15ee775f2ba88208f77b0678ff0b06 100644 |
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp |
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp |
@@ -1592,9 +1592,17 @@ private: |
, fColor(color) |
, fPath(path) |
, fStroke(stroke) |
- , fViewMatrix(viewMatrix) |
- , fClipBounds(clipBounds) { |
- fBounds = path.getBounds(); |
+ , fViewMatrix(viewMatrix) { |
+ const SkRect& pathBounds = path.getBounds(); |
+ fClipBounds = clipBounds; |
+ // Because the clip bounds are used to add a contour for inverse fills, they must also |
+ // include the path bounds. |
+ fClipBounds.join(pathBounds); |
+ if (path.isInverseFillType()) { |
+ fBounds = fClipBounds; |
+ } else { |
+ fBounds = path.getBounds(); |
+ } |
if (!stroke.isFillStyle()) { |
SkScalar radius = SkScalarHalf(stroke.getWidth()); |
if (stroke.getJoin() == SkPaint::kMiter_Join) { |