From 3a0c3696f0ece5e408baf9d1ed14251ba7a223e3 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Mon, 22 Aug 2016 11:48:44 -0700 Subject: [PATCH] Remove quantization of device-space dest rect for Ganesh analytic rrect blurs At least on Windows, this fixes a lot of the horrible banded blurs. AFAICT there is no good reason to quantize the device space rect passed to the GrRectBlurEffect. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262263002 Review-Url: https://codereview.chromium.org/2262263002 --- src/effects/SkBlurMaskFilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index c044333efb..cbaed9b669 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -1034,8 +1034,8 @@ bool SkBlurMaskFilterImpl::directFilterMaskGPU(GrTextureProvider* texProvider, SkRect rect; if (path.isRect(&rect)) { - int pad = SkScalarCeilToInt(6*xformedSigma)/2; - rect.outset(SkIntToScalar(pad), SkIntToScalar(pad)); + SkScalar pad = 3.0f * xformedSigma; + rect.outset(pad, pad); fp = GrRectBlurEffect::Make(texProvider, rect, xformedSigma); } else if (path.isOval(&rect) && SkScalarNearlyEqual(rect.width(), rect.height())) { -- 2.34.1