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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 119343003: Fast blurred rectangles on GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup patch + check for fill vs. stroke Created 7 years 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
« src/effects/SkBlurMaskFilter.cpp ('K') | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | 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 ce02f2c55fc97fa76beba1068cc36ae9277b44c6..4527dec1304e0be655d9225d828e7cd84a1bc628 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -904,7 +904,7 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
// transform the path into device space
pathPtr->transform(fContext->getMatrix(), devPathPtr);
-
+
SkRect maskRect;
if (paint.getMaskFilter()->canFilterMaskGPU(devPathPtr->getBounds(),
draw.fClip->getBounds(),
@@ -920,6 +920,14 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
// nothing to draw
return;
}
+
+ bool doFill = paint.getStyle() == SkPaint::kFill_Style;
+
+ if (paint.getMaskFilter()->directFilterMaskGPU(fContext, &grPaint, doFill, devPathPtr)) {
+ // the mask filter was able to draw itself directly, so there's nothing
+ // left to do.
+ return;
+ }
GrAutoScratchTexture mask;
« src/effects/SkBlurMaskFilter.cpp ('K') | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698