Add test to exercise extreme blur sigmas
https://codereview.chromium.org/23530039/
git-svn-id: http://skia.googlecode.com/svn/trunk/src@11099 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/effects/SkBlurMask.cpp b/effects/SkBlurMask.cpp
index 134fef6..d279880 100644
--- a/effects/SkBlurMask.cpp
+++ b/effects/SkBlurMask.cpp
@@ -873,7 +873,7 @@
float variance = sigma * sigma;
- int windowSize = SkScalarCeil(sigma*4);
+ int windowSize = SkScalarCeil(sigma*6);
// round window size up to nearest odd number
windowSize |= 1;
@@ -885,7 +885,7 @@
float windowSum = 1;
for (int x = 1 ; x <= halfWindow ; ++x) {
- float gaussian = expf(-x*x / variance);
+ float gaussian = expf(-x*x / (2*variance));
gaussWindow[halfWindow + x] = gaussWindow[halfWindow-x] = gaussian;
windowSum += 2*gaussian;
}