Partial revert of r9087

https://codereview.chromium.org/14858035/



git-svn-id: http://skia.googlecode.com/svn/trunk@9106 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-05-13 13:38:35 +00:00
parent 3f4ea26ff5
commit 28ac96e40d

View File

@ -681,6 +681,7 @@ static void setStrokeRectStrip(GrPoint verts[10], GrRect rect,
}
static bool apply_aa_to_rect(GrDrawTarget* target,
const GrRect& rect,
SkScalar strokeWidth,
const SkMatrix* matrix,
SkMatrix* combinedMatrix,
@ -753,6 +754,10 @@ static bool apply_aa_to_rect(GrDrawTarget* target,
#endif
}
if (0 == rect.width() || 0 == rect.height()) {
return false;
}
return true;
}
@ -769,7 +774,7 @@ void GrContext::drawRect(const GrPaint& paint,
bool useVertexCoverage;
bool needAA = paint.isAntiAlias() &&
!this->getRenderTarget()->isMultisampled();
bool doAA = needAA && apply_aa_to_rect(target, width, matrix,
bool doAA = needAA && apply_aa_to_rect(target, rect, width, matrix,
&combinedMatrix,
&useVertexCoverage);
if (doAA) {