Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1049)

Unified Diff: src/effects/SkBlurMask.cpp

Issue 23530039: Add test to exercise extreme blur sigmas (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Renamed function Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/BlurTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | tests/BlurTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698