Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index d897f3ce88ff4686c97c65b4f4edbca175c3825e..540fbe3e06e782cfa8e30e26e2bc443f6c690c75 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -507,6 +507,10 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, |
usePath = true; |
} |
+ if (strokeInfo.isDashed()) { |
+ usePath = true; |
+ } |
+ |
if (usePath) { |
SkPath path; |
path.setIsVolatile(true); |
@@ -515,12 +519,8 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, |
return; |
} |
- GrPaint grPaint; |
- if (!SkPaint2GrPaint(this->context(), fRenderTarget, paint, *draw.fMatrix, true, &grPaint)) { |
- return; |
- } |
- |
- fDrawContext->drawRect(fRenderTarget, fClip, grPaint, *draw.fMatrix, rect, &strokeInfo); |
+ GrDrawRect grDraw(fRenderTarget, fContext, fClip, paint, *draw.fMatrix, rect, &strokeInfo); |
+ fDrawContext->draw(grDraw); |
} |
/////////////////////////////////////////////////////////////////////////////// |
@@ -1021,9 +1021,6 @@ static void draw_aa_bitmap(GrDrawContext* drawContext, GrContext* context, |
// Setup dst rect and final matrix |
SkRect dstRect = {0, 0, dstSize.fWidth, dstSize.fHeight}; |
- SkRect devRect; |
- viewMatrix.mapRect(&devRect, dstRect); |
- |
SkMatrix matrix; |
matrix.setIDiv(bitmapPtr->width(), bitmapPtr->height()); |
@@ -1036,8 +1033,7 @@ static void draw_aa_bitmap(GrDrawContext* drawContext, GrContext* context, |
SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateAAFill(grPaint.getColor(), |
viewMatrix, |
matrix, |
- dstRect, |
- devRect)); |
+ dstRect)); |
drawContext->drawBatch(renderTarget, clip, grPaint, batch); |
} |