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

Unified Diff: gm/rects.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/megalooper.cpp ('k') | gm/shadows.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rects.cpp
===================================================================
--- gm/rects.cpp (revision 11108)
+++ gm/rects.cpp (working copy)
@@ -6,11 +6,12 @@
*/
#include "gm.h"
-#include "SkTArray.h"
-#include "SkMatrix.h"
+#include "SkBlurDrawLooper.h"
+#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
#include "SkGradientShader.h"
-#include "SkBlurDrawLooper.h"
+#include "SkMatrix.h"
+#include "SkTArray.h"
namespace skiagm {
@@ -53,8 +54,9 @@
SkPaint p;
p.setColor(SK_ColorWHITE);
p.setAntiAlias(true);
- SkMaskFilter* mf = SkBlurMaskFilter::Create(SkIntToScalar(5),
+ SkMaskFilter* mf = SkBlurMaskFilter::Create(
SkBlurMaskFilter::kNormal_BlurStyle,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
SkBlurMaskFilter::kHighQuality_BlurFlag);
p.setMaskFilter(mf)->unref();
fPaints.push_back(p);
@@ -84,8 +86,9 @@
p.setColor(SK_ColorWHITE);
p.setAntiAlias(true);
SkBlurDrawLooper* shadowLooper =
- new SkBlurDrawLooper (SkIntToScalar(10), SkIntToScalar(5),
- SkIntToScalar(10), SK_ColorWHITE,
+ new SkBlurDrawLooper (SK_ColorWHITE,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)),
+ SkIntToScalar(5), SkIntToScalar(10),
SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
SkBlurDrawLooper::kOverrideColor_BlurFlag |
SkBlurDrawLooper::kHighQuality_BlurFlag);
« no previous file with comments | « gm/megalooper.cpp ('k') | gm/shadows.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698