Index: gm/imagefiltersscaled.cpp |
diff --git a/gm/imagefiltersscaled.cpp b/gm/imagefiltersscaled.cpp |
index ab24a3025f170685cbdea17b188ddb80ba511cb2..809e7ea3445937dc3526586a61f4728756a0beaf 100644 |
--- a/gm/imagefiltersscaled.cpp |
+++ b/gm/imagefiltersscaled.cpp |
@@ -86,24 +86,24 @@ protected: |
} |
canvas->clear(0x00000000); |
- SkAutoTUnref<SkImageFilter> gradient(new SkBitmapSource(fGradientCircle)); |
- SkAutoTUnref<SkImageFilter> checkerboard(new SkBitmapSource(fCheckerboard)); |
+ SkAutoTUnref<SkImageFilter> gradient(SkBitmapSource::Create(fGradientCircle)); |
+ SkAutoTUnref<SkImageFilter> checkerboard(SkBitmapSource::Create(fCheckerboard)); |
SkAutoTUnref<SkShader> noise(SkPerlinNoiseShader::CreateFractalNoise( |
SkDoubleToScalar(0.1), SkDoubleToScalar(0.05), 1, 0)); |
SkImageFilter* filters[] = { |
- new SkBlurImageFilter(SkIntToScalar(4), SkIntToScalar(4)), |
- new SkDropShadowImageFilter(SkIntToScalar(5), SkIntToScalar(10), SkIntToScalar(3), |
- SK_ColorYELLOW), |
- new SkDisplacementMapEffect(SkDisplacementMapEffect::kR_ChannelSelectorType, |
- SkDisplacementMapEffect::kR_ChannelSelectorType, |
- SkIntToScalar(12), |
- gradient.get(), |
- checkerboard.get()), |
- new SkDilateImageFilter(1, 1, checkerboard.get()), |
- new SkErodeImageFilter(1, 1, checkerboard.get()), |
- new SkOffsetImageFilter(SkIntToScalar(32), 0), |
- new SkResizeImageFilter(RESIZE_FACTOR, RESIZE_FACTOR, SkPaint::kNone_FilterLevel), |
+ SkBlurImageFilter::Create(SkIntToScalar(4), SkIntToScalar(4)), |
+ SkDropShadowImageFilter::Create(SkIntToScalar(5), SkIntToScalar(10), SkIntToScalar(3), |
+ SK_ColorYELLOW), |
+ SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelSelectorType, |
+ SkDisplacementMapEffect::kR_ChannelSelectorType, |
+ SkIntToScalar(12), |
+ gradient.get(), |
+ checkerboard.get()), |
+ SkDilateImageFilter::Create(1, 1, checkerboard.get()), |
+ SkErodeImageFilter::Create(1, 1, checkerboard.get()), |
+ SkOffsetImageFilter::Create(SkIntToScalar(32), 0), |
+ SkResizeImageFilter::Create(RESIZE_FACTOR, RESIZE_FACTOR, SkPaint::kNone_FilterLevel), |
SkRectShaderImageFilter::Create(noise), |
}; |