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

Unified Diff: gm/circles.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/blurs.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/circles.cpp
===================================================================
--- gm/circles.cpp (revision 11108)
+++ gm/circles.cpp (working copy)
@@ -6,12 +6,13 @@
* found in the LICENSE file.
*/
#include "gm.h"
-#include "SkTArray.h"
-#include "SkRandom.h"
-#include "SkMatrix.h"
+#include "SkBlurDrawLooper.h"
+#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
#include "SkGradientShader.h"
-#include "SkBlurDrawLooper.h"
+#include "SkMatrix.h"
+#include "SkRandom.h"
+#include "SkTArray.h"
namespace skiagm {
@@ -50,8 +51,9 @@
// AA with mask filter
SkPaint p;
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);
@@ -79,8 +81,9 @@
SkPaint p;
p.setAntiAlias(true);
SkBlurDrawLooper* shadowLooper =
- new SkBlurDrawLooper (SkIntToScalar(10), SkIntToScalar(5),
- SkIntToScalar(10), 0xFF0000FF,
+ new SkBlurDrawLooper (SK_ColorBLUE,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)),
+ SkIntToScalar(5), SkIntToScalar(10),
SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
SkBlurDrawLooper::kOverrideColor_BlurFlag |
SkBlurDrawLooper::kHighQuality_BlurFlag);
« no previous file with comments | « gm/blurs.cpp ('k') | gm/drawbitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698