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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1311583005: Add special case circle blur for Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up 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
« src/effects/GrCircleBlurFragmentProcessor.h ('K') | « src/gpu/GrBlurUtils.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 fd03acc24012dc6a2a50e58778c645749a080d59..99f582fc7b8f8d83417c84a3beb03379c423b8f5 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -544,7 +544,7 @@ void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rect,
if (rect.transform(*draw.fMatrix, &devRRect)) {
if (devRRect.allCornersCircular()) {
SkRect maskRect;
- if (paint.getMaskFilter()->canFilterMaskGPU(devRRect.rect(),
+ if (paint.getMaskFilter()->canFilterMaskGPU(devRRect,
draw.fClip->getBounds(),
*draw.fMatrix,
&maskRect)) {
@@ -637,7 +637,9 @@ void SkGpuDevice::drawOval(const SkDraw& draw, const SkRect& oval,
bool usePath = false;
// some basic reasons we might need to call drawPath...
if (paint.getMaskFilter()) {
- usePath = true;
+ // The RRect path can handle special case blurring
+ SkRRect rr = SkRRect::MakeOval(oval);
+ return this->drawRRect(draw, rr, paint);
} else {
const SkPathEffect* pe = paint.getPathEffect();
if (pe && !strokeInfo.isDashed()) {
« src/effects/GrCircleBlurFragmentProcessor.h ('K') | « src/gpu/GrBlurUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698