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

Unified Diff: gm/shadows.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/rects.cpp ('k') | gm/texteffects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/shadows.cpp
===================================================================
--- gm/shadows.cpp (revision 11108)
+++ gm/shadows.cpp (working copy)
@@ -6,6 +6,7 @@
* found in the LICENSE file.
*/
#include "gm.h"
+#include "SkBlurMask.h"
#include "SkBlurDrawLooper.h"
namespace skiagm {
@@ -46,34 +47,39 @@
virtual void onDraw(SkCanvas* canvas) {
SkBlurDrawLooper* shadowLoopers[5];
shadowLoopers[0] =
- 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);
SkAutoUnref aurL0(shadowLoopers[0]);
shadowLoopers[1] =
- 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);
SkAutoUnref aurL1(shadowLoopers[1]);
shadowLoopers[2] =
- new SkBlurDrawLooper (SkIntToScalar(5), SkIntToScalar(5),
- SkIntToScalar(10), 0xFF000000,
+ new SkBlurDrawLooper (SK_ColorBLACK,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
+ SkIntToScalar(5),
+ SkIntToScalar(10),
SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
SkBlurDrawLooper::kHighQuality_BlurFlag);
SkAutoUnref aurL2(shadowLoopers[2]);
shadowLoopers[3] =
- new SkBlurDrawLooper (SkIntToScalar(5), SkIntToScalar(-5),
- SkIntToScalar(-10), 0x7FFF0000,
+ new SkBlurDrawLooper (0x7FFF0000,
+ SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)),
+ SkIntToScalar(-5), SkIntToScalar(-10),
SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
SkBlurDrawLooper::kOverrideColor_BlurFlag |
SkBlurDrawLooper::kHighQuality_BlurFlag);
SkAutoUnref aurL3(shadowLoopers[3]);
shadowLoopers[4] =
- new SkBlurDrawLooper (SkIntToScalar(0), SkIntToScalar(5),
- SkIntToScalar(5), 0xFF000000,
+ new SkBlurDrawLooper (SK_ColorBLACK, SkIntToScalar(0),
+ SkIntToScalar(5), SkIntToScalar(5),
SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
SkBlurDrawLooper::kOverrideColor_BlurFlag |
SkBlurDrawLooper::kHighQuality_BlurFlag);
« no previous file with comments | « gm/rects.cpp ('k') | gm/texteffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698