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); |