Index: gm/imagefiltersgraph.cpp |
diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp |
index f97072e443d1fff61760c7946112023844804260..fb957e72f288ec69fcecf7814caf958476700226 100644 |
--- a/gm/imagefiltersgraph.cpp |
+++ b/gm/imagefiltersgraph.cpp |
@@ -121,13 +121,13 @@ protected: |
} |
canvas->clear(0x00000000); |
{ |
- SkAutoTUnref<SkImageFilter> bitmapSource(new SkBitmapSource(fBitmap)); |
+ SkAutoTUnref<SkImageFilter> bitmapSource(SkBitmapSource::Create(fBitmap)); |
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(SK_ColorRED, |
SkXfermode::kSrcIn_Mode)); |
- SkAutoTUnref<SkImageFilter> blur(new SkBlurImageFilter(4.0f, 4.0f, bitmapSource)); |
- SkAutoTUnref<SkImageFilter> erode(new SkErodeImageFilter(4, 4, blur)); |
+ SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(4.0f, 4.0f, bitmapSource)); |
+ SkAutoTUnref<SkImageFilter> erode(SkErodeImageFilter::Create(4, 4, blur)); |
SkAutoTUnref<SkImageFilter> color(SkColorFilterImageFilter::Create(cf, erode)); |
- SkAutoTUnref<SkImageFilter> merge(new SkMergeImageFilter(blur, color)); |
+ SkAutoTUnref<SkImageFilter> merge(SkMergeImageFilter::Create(blur, color)); |
SkPaint paint; |
paint.setImageFilter(merge); |
@@ -135,7 +135,7 @@ protected: |
canvas->translate(SkIntToScalar(100), 0); |
} |
{ |
- SkAutoTUnref<SkImageFilter> morph(new SkDilateImageFilter(5, 5)); |
+ SkAutoTUnref<SkImageFilter> morph(SkDilateImageFilter::Create(5, 5)); |
SkScalar matrix[20] = { SK_Scalar1, 0, 0, 0, 0, |
0, SK_Scalar1, 0, 0, 0, |
@@ -145,7 +145,7 @@ protected: |
SkAutoTUnref<SkColorFilter> matrixFilter(SkColorMatrixFilter::Create(matrix)); |
SkAutoTUnref<SkImageFilter> colorMorph(SkColorFilterImageFilter::Create(matrixFilter, morph)); |
SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(SkXfermode::kSrcOver_Mode)); |
- SkAutoTUnref<SkImageFilter> blendColor(new SkXfermodeImageFilter(mode, colorMorph)); |
+ SkAutoTUnref<SkImageFilter> blendColor(SkXfermodeImageFilter::Create(mode, colorMorph)); |
SkPaint paint; |
paint.setImageFilter(blendColor); |
@@ -162,20 +162,22 @@ protected: |
SimpleOffsetFilter offsetFilter(SkIntToScalar(10), SkIntToScalar(10), matrixFilter); |
SkAutoTUnref<SkXfermode> arith(SkArithmeticMode::Create(0, SK_Scalar1, SK_Scalar1, 0)); |
- SkXfermodeImageFilter arithFilter(arith, matrixFilter, &offsetFilter); |
+ SkAutoTUnref<SkXfermodeImageFilter> arithFilter( |
+ SkXfermodeImageFilter::Create(arith, matrixFilter, &offsetFilter)); |
SkPaint paint; |
- paint.setImageFilter(&arithFilter); |
+ paint.setImageFilter(arithFilter); |
drawClippedBitmap(canvas, fBitmap, paint); |
canvas->translate(SkIntToScalar(100), 0); |
} |
{ |
- SkAutoTUnref<SkImageFilter> blur(new SkBlurImageFilter( |
+ SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create( |
SkIntToScalar(10), SkIntToScalar(10))); |
SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(SkXfermode::kSrcIn_Mode)); |
SkImageFilter::CropRect cropRect(SkRect::MakeWH(SkIntToScalar(95), SkIntToScalar(100))); |
- SkAutoTUnref<SkImageFilter> blend(new SkXfermodeImageFilter(mode, blur, NULL, &cropRect)); |
+ SkAutoTUnref<SkImageFilter> blend( |
+ SkXfermodeImageFilter::Create(mode, blur, NULL, &cropRect)); |
SkPaint paint; |
paint.setImageFilter(blend); |