Index: src/gpu/GrAARectRenderer.cpp |
=================================================================== |
--- src/gpu/GrAARectRenderer.cpp (revision 9079) |
+++ src/gpu/GrAARectRenderer.cpp (working copy) |
@@ -364,7 +364,6 @@ |
GrDrawTarget* target, |
const GrRect& rect, |
const SkMatrix& combinedMatrix, |
- const GrRect& devRect, |
bool useVertexCoverage) { |
GrDrawState* drawState = target->drawState(); |
@@ -389,6 +388,9 @@ |
GrPoint* fan0Pos = reinterpret_cast<GrPoint*>(verts); |
GrPoint* fan1Pos = reinterpret_cast<GrPoint*>(verts + 4 * vsize); |
+ SkRect devRect; |
+ combinedMatrix.mapRect(&devRect, rect); |
+ |
if (combinedMatrix.rectStaysRect()) { |
set_inset_fan(fan0Pos, vsize, devRect, -SK_ScalarHalf, -SK_ScalarHalf); |
set_inset_fan(fan1Pos, vsize, devRect, SK_ScalarHalf, SK_ScalarHalf); |
@@ -616,16 +618,20 @@ |
void GrAARectRenderer::strokeAARect(GrGpu* gpu, |
GrDrawTarget* target, |
- const GrRect& devRect, |
+ const GrRect& rect, |
+ const SkMatrix& combinedMatrix, |
const GrVec& devStrokeSize, |
bool useVertexCoverage) { |
GrDrawState* drawState = target->drawState(); |
- const SkScalar& dx = devStrokeSize.fX; |
- const SkScalar& dy = devStrokeSize.fY; |
+ const SkScalar dx = devStrokeSize.fX; |
+ const SkScalar dy = devStrokeSize.fY; |
const SkScalar rx = SkScalarMul(dx, SK_ScalarHalf); |
const SkScalar ry = SkScalarMul(dy, SK_ScalarHalf); |
+ SkRect devRect; |
+ combinedMatrix.mapRect(&devRect, rect); |
+ |
SkScalar spare; |
{ |
SkScalar w = devRect.width() - dx; |
@@ -634,9 +640,8 @@ |
} |
if (spare <= 0) { |
- GrRect r(devRect); |
- r.inset(-rx, -ry); |
- this->fillAARect(gpu, target, r, SkMatrix::I(), r, useVertexCoverage); |
+ devRect.inset(-rx, -ry); |
+ this->fillAARect(gpu, target, devRect, SkMatrix::I(), useVertexCoverage); |
return; |
} |