Index: gm/perspshaders.cpp |
diff --git a/gm/perspshaders.cpp b/gm/perspshaders.cpp |
index a29ef52f460305dff7d1f01febf1b0d07c820f27..59fab47fc8ed2d5c66b76d7f3bab373a7f87687f 100644 |
--- a/gm/perspshaders.cpp |
+++ b/gm/perspshaders.cpp |
@@ -46,8 +46,9 @@ |
SK_ColorBLUE, SK_ColorYELLOW, |
kCellSize/10); |
- fBitmapShader = SkShader::MakeBitmapShader(fBitmap, SkShader::kClamp_TileMode, |
- SkShader::kClamp_TileMode); |
+ fBitmapShader.reset(SkShader::CreateBitmapShader(fBitmap, |
+ SkShader::kClamp_TileMode, |
+ SkShader::kClamp_TileMode)); |
SkPoint pts1[] = { |
{ 0, 0 }, |
{ SkIntToScalar(kCellSize), SkIntToScalar(kCellSize) } |
@@ -61,10 +62,12 @@ |
}; |
static const SkScalar pos[] = { 0, 0.25f, 0.5f, 0.75f, SK_Scalar1 }; |
- fLinearGrad1 = SkGradientShader::MakeLinear(pts1, colors, pos, SK_ARRAY_COUNT(colors), |
- SkShader::kClamp_TileMode); |
- fLinearGrad2 = SkGradientShader::MakeLinear(pts2, colors, pos, SK_ARRAY_COUNT(colors), |
- SkShader::kClamp_TileMode); |
+ fLinearGrad1.reset(SkGradientShader::CreateLinear(pts1, colors, pos, |
+ SK_ARRAY_COUNT(colors), |
+ SkShader::kClamp_TileMode)); |
+ fLinearGrad2.reset(SkGradientShader::CreateLinear(pts2, colors, pos, |
+ SK_ARRAY_COUNT(colors), |
+ SkShader::kClamp_TileMode)); |
fPerspMatrix.reset(); |
fPerspMatrix.setPerspY(SK_Scalar1 / 50); |
@@ -157,9 +160,9 @@ |
bool fDoAA; |
SkPath fPath; |
- sk_sp<SkShader> fBitmapShader; |
- sk_sp<SkShader> fLinearGrad1; |
- sk_sp<SkShader> fLinearGrad2; |
+ SkAutoTUnref<SkShader> fBitmapShader; |
+ SkAutoTUnref<SkShader> fLinearGrad1; |
+ SkAutoTUnref<SkShader> fLinearGrad2; |
SkMatrix fPerspMatrix; |
SkAutoTUnref<SkImage> fImage; |
SkBitmap fBitmap; |