Remove quantization of device-space dest rect for Ganesh analytic rrect blurs
authorrobertphillips <robertphillips@google.com>
Mon, 22 Aug 2016 18:48:44 +0000 (11:48 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 22 Aug 2016 18:48:44 +0000 (11:48 -0700)
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

index c044333..cbaed9b 100644 (file)
@@ -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())) {