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

Unified Diff: samplecode/SampleStrokePath.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, 4 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
Index: samplecode/SampleStrokePath.cpp
===================================================================
--- samplecode/SampleStrokePath.cpp (revision 11004)
+++ samplecode/SampleStrokePath.cpp (working copy)
@@ -168,14 +168,14 @@
};
for (int x = 0; x < 5; x++) {
SkMaskFilter* mf;
- SkScalar radius = 4;
+ SkScalar sigma = SkFloatToScalar(2.8094f);
for (int y = 0; y < 10; y++) {
if (x) {
- mf = SkBlurMaskFilter::Create(radius, gStyle[x - 1]);
+ mf = SkBlurMaskFilter::Create(gStyle[x - 1], sigma);
paint.setMaskFilter(mf)->unref();
}
canvas->drawText("Title Bar", 9, x*SkIntToScalar(100), y*SkIntToScalar(30), paint);
- radius *= 0.75f;
+ sigma *= 0.75f;
}
}

Powered by Google App Engine
This is Rietveld 408576698