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

Unified Diff: gm/megalooper.cpp

Issue 23701006: Push sigma-based blur interface into our GMs/benches/tests/samplecode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up 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 | « gm/drawlooper.cpp ('k') | gm/rects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/megalooper.cpp
===================================================================
--- gm/megalooper.cpp (revision 11108)
+++ gm/megalooper.cpp (working copy)
@@ -6,10 +6,11 @@
*/
#include "gm.h"
+#include "SkBlurMask.h"
+#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
-#include "SkBlurMaskFilter.h"
+#include "SkColorFilter.h"
#include "SkLayerDrawLooper.h"
-#include "SkColorFilter.h"
// This GM tests 3 different ways of drawing four shadows around a square:
// just using 4 blurred rects
@@ -110,10 +111,10 @@
}
SkMaskFilter* createBlur() {
- static const SkScalar kBlurRadius = 25.0f;
+ static const SkScalar kBlurSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(25));
- return SkBlurMaskFilter::Create(kBlurRadius,
- SkBlurMaskFilter::kNormal_BlurStyle,
+ return SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle,
+ kBlurSigma,
SkBlurMaskFilter::kHighQuality_BlurFlag);
}
« no previous file with comments | « gm/drawlooper.cpp ('k') | gm/rects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698