From: robertphillips Date: Mon, 22 Aug 2016 18:48:44 +0000 (-0700) Subject: Remove quantization of device-space dest rect for Ganesh analytic rrect blurs X-Git-Tag: submit/tizen/20180928.044319~116^2~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a0c3696f0ece5e408baf9d1ed14251ba7a223e3;p=platform%2Fupstream%2FlibSkiaSharp.git 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 --- 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())) {