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

Unified Diff: samplecode/SampleXfermodesBlur.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 | « samplecode/SampleUnpremul.cpp ('k') | src/animator/SkDrawBlur.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleXfermodesBlur.cpp
===================================================================
--- samplecode/SampleXfermodesBlur.cpp (revision 11108)
+++ samplecode/SampleXfermodesBlur.cpp (working copy)
@@ -7,6 +7,7 @@
*/
#include "SampleCode.h"
#include "SkView.h"
+#include "SkBlurMask.h"
#include "SkCanvas.h"
#include "Sk64.h"
#include "SkCornerPathEffect.h"
@@ -46,8 +47,9 @@
void draw_mode(SkCanvas* canvas, SkXfermode* mode, int alpha,
SkScalar x, SkScalar y) {
SkPaint p;
- SkMaskFilter* mf = SkBlurMaskFilter::Create(5, SkBlurMaskFilter::kNormal_BlurStyle,
- SkBlurMaskFilter::kNone_BlurFlag);
+ SkMaskFilter* mf = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
+ SkBlurMaskFilter::kNone_BlurFlag);
p.setMaskFilter(mf)->unref();
SkScalar ww = SkIntToScalar(W);
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | src/animator/SkDrawBlur.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698