aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-13 13:38:35 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-13 13:38:35 +0000
commit28ac96e40d705f7fb08a61ac027e15de8d91823c (patch)
treed1d9b16acb17efa6d60e73f7b7f7c18af2412047 /src
parent3f4ea26ff5794547c4c7ff40b265700fff551521 (diff)
Partial revert of r9087
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 679771eed1..a865d81729 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -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) {