Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 65d1fe9de64b4b1a51c94276e4c0a21ab15fd264..b0d34fd03933af6e531ca3b4ae78fbd723477cc7 100644 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -795,7 +795,7 @@ static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po |
void GrContext::drawRect(const GrPaint& paint, |
const SkRect& rect, |
- SkScalar width, |
+ const SkStrokeRec* stroke, |
const SkMatrix* matrix) { |
SK_TRACE_EVENT0("GrContext::drawRect"); |
@@ -803,6 +803,7 @@ void GrContext::drawRect(const GrPaint& paint, |
AutoCheckFlush acf(this); |
GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW, &are, &acf); |
+ SkScalar width = stroke == NULL ? -1 : stroke->getWidth(); |
SkMatrix combinedMatrix = target->drawState()->getViewMatrix(); |
if (NULL != matrix) { |
combinedMatrix.preConcat(*matrix); |
@@ -855,9 +856,9 @@ void GrContext::drawRect(const GrPaint& paint, |
return; |
} |
if (width >= 0) { |
- fAARectRenderer->strokeAARect(this->getGpu(), target, |
- rect, combinedMatrix, devBoundRect, |
- width, useVertexCoverage); |
+ fAARectRenderer->strokeAARect(this->getGpu(), target, rect, |
+ combinedMatrix, devBoundRect, |
+ stroke, useVertexCoverage); |
} else { |
// filled AA rect |
fAARectRenderer->fillAARect(this->getGpu(), target, |