Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1336413006: Just an experiment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698