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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1472333003: Clean up Ganesh path render a little bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ooops Created 5 years, 1 month 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/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice_drawTexture.cpp » ('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 929b57c6b5305b3809d72d6830ebcb1c452ef270..46e8df4443ca2601ca09a5decdbcc3e62a056c1c 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -456,7 +456,6 @@ void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode,
void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, const SkPaint& paint) {
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawRect", fContext);
-
CHECK_FOR_ANNOTATION(paint);
CHECK_SHOULD_DRAW(draw);
@@ -569,21 +568,20 @@ void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rect,
void SkGpuDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
const SkRRect& inner, const SkPaint& paint) {
- SkStrokeRec stroke(paint);
- if (stroke.isFillStyle()) {
+ GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawDRRect", fContext);
+ CHECK_FOR_ANNOTATION(paint);
+ CHECK_SHOULD_DRAW(draw);
- CHECK_FOR_ANNOTATION(paint);
- CHECK_SHOULD_DRAW(draw);
+ SkStrokeRec stroke(paint);
+ if (stroke.isFillStyle() && !paint.getMaskFilter() && !paint.getPathEffect()) {
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), paint, *draw.fMatrix, &grPaint)) {
return;
}
- if (nullptr == paint.getMaskFilter() && nullptr == paint.getPathEffect()) {
- fDrawContext->drawDRRect(fClip, grPaint, *draw.fMatrix, outer, inner);
- return;
- }
+ fDrawContext->drawDRRect(fClip, grPaint, *draw.fMatrix, outer, inner);
+ return;
}
SkPath path;
@@ -592,7 +590,10 @@ void SkGpuDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
path.addRRect(inner);
path.setFillType(SkPath::kEvenOdd_FillType);
- this->drawPath(draw, path, paint, nullptr, true);
+ GrBlurUtils::drawPathWithMaskFilter(fContext, fDrawContext, fRenderTarget,
+ fClip, path, paint,
+ *draw.fMatrix, nullptr,
+ draw.fClip->getBounds(), true);
}
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice_drawTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698