Index: src/gpu/batches/GrRectBatchFactory.cpp |
diff --git a/src/gpu/batches/GrRectBatchFactory.cpp b/src/gpu/batches/GrRectBatchFactory.cpp |
index eed18ad419637e788065495cf2729ae748fb6fa1..ca8bc1f84a63d594d4f17edc4e31cf59c37fdb4f 100644 |
--- a/src/gpu/batches/GrRectBatchFactory.cpp |
+++ b/src/gpu/batches/GrRectBatchFactory.cpp |
@@ -33,13 +33,6 @@ GrDrawBatch* CreateAAStroke(GrColor color, |
const SkScalar rx = SkScalarMul(dx, SK_ScalarHalf); |
const SkScalar ry = SkScalarMul(dy, SK_ScalarHalf); |
- SkScalar spare; |
- { |
- SkScalar w = devRect.width() - dx; |
- SkScalar h = devRect.height() - dy; |
- spare = SkTMin(w, h); |
- } |
- |
SkRect devOutside(devRect); |
devOutside.outset(rx, ry); |
@@ -51,12 +44,10 @@ GrDrawBatch* CreateAAStroke(GrColor color, |
miterStroke = false; |
} |
- if (spare <= 0 && miterStroke) { |
- return CreateAAFill(color, viewMatrix, devOutside, devOutside); |
- } |
- |
SkRect devInside(devRect); |
robertphillips
2015/09/20 15:49:40
It seems like we could get cracking with this meth
|
- devInside.inset(rx, ry); |
+ SkScalar insideRx = SkTMin(devRect.width() / 2.0f, rx); |
+ SkScalar insideRy = SkTMin(devRect.height() / 2.0f, ry); |
+ devInside.inset(insideRx, insideRy); |
SkRect devOutsideAssist(devRect); |