Index: src/effects/SkBlurMask.cpp |
=================================================================== |
--- src/effects/SkBlurMask.cpp (revision 11085) |
+++ src/effects/SkBlurMask.cpp (working copy) |
@@ -873,7 +873,7 @@ |
float variance = sigma * sigma; |
robertphillips
2013/09/05 13:30:38
The 4x window still had some edge effects (when co
|
- 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)); |
humper
2013/09/05 14:19:23
WHOOPS, nice catch.
|
gaussWindow[halfWindow + x] = gaussWindow[halfWindow-x] = gaussian; |
windowSum += 2*gaussian; |
} |