diff options
Diffstat (limited to 'src/gpu/GrDrawContext.cpp')
-rw-r--r-- | src/gpu/GrDrawContext.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp index 94fcee0313..1969bd03be 100644 --- a/src/gpu/GrDrawContext.cpp +++ b/src/gpu/GrDrawContext.cpp @@ -273,13 +273,12 @@ void GrDrawContext::drawRect(GrRenderTarget* rt, if (needAA && canApplyAA) { SkASSERT(!viewMatrix.hasPerspective()); - SkRect devBoundRect; - viewMatrix.mapRect(&devBoundRect, rect); SkAutoTUnref<GrDrawBatch> batch; if (width >= 0) { - batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, devBoundRect, - *strokeInfo)); + batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, *strokeInfo)); } else { + SkRect devBoundRect; + viewMatrix.mapRect(&devBoundRect, rect); batch.reset(GrRectBatchFactory::CreateAAFill(color, viewMatrix, rect, devBoundRect)); } fDrawTarget->drawBatch(pipelineBuilder, batch); |