Index: gm/xfermodes3.cpp |
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp |
index 8c24bf72d1abb80f823d95df71c51445da7b4fe4..4cd05df5c40c4f436209393f67b33d3bbe8750c1 100644 |
--- a/gm/xfermodes3.cpp |
+++ b/gm/xfermodes3.cpp |
@@ -185,21 +185,17 @@ private: |
SkMatrix lm; |
lm.setScale(SkIntToScalar(kCheckSize), SkIntToScalar(kCheckSize)); |
- fBGShader.reset(SkShader::CreateBitmapShader(bg, |
- SkShader::kRepeat_TileMode, |
- SkShader::kRepeat_TileMode, |
- &lm)); |
+ fBGShader = SkShader::MakeBitmapShader(bg, SkShader::kRepeat_TileMode, |
+ SkShader::kRepeat_TileMode, &lm); |
SkPaint bmpPaint; |
- static const SkPoint kCenter = { SkIntToScalar(kSize) / 2, SkIntToScalar(kSize) / 2 }; |
- static const SkColor kColors[] = { SK_ColorTRANSPARENT, 0x80800000, |
- 0xF020F060, SK_ColorWHITE }; |
- bmpPaint.setShader(SkGradientShader::CreateRadial(kCenter, |
- 3 * SkIntToScalar(kSize) / 4, |
- kColors, |
- nullptr, |
- SK_ARRAY_COUNT(kColors), |
- SkShader::kRepeat_TileMode))->unref(); |
+ const SkPoint kCenter = { SkIntToScalar(kSize) / 2, SkIntToScalar(kSize) / 2 }; |
+ const SkColor kColors[] = { |
+ SK_ColorTRANSPARENT, 0x80800000, 0xF020F060, SK_ColorWHITE |
+ }; |
+ bmpPaint.setShader(SkGradientShader::MakeRadial(kCenter, 3 * SkIntToScalar(kSize) / 4, |
+ kColors, nullptr, SK_ARRAY_COUNT(kColors), |
+ SkShader::kRepeat_TileMode)); |
SkBitmap bmp; |
bmp.allocN32Pixels(kSize, kSize); |
@@ -210,9 +206,8 @@ private: |
7 * SkIntToScalar(kSize) / 8, 7 * SkIntToScalar(kSize) / 8}; |
bmpCanvas.drawRect(rect, bmpPaint); |
- fBmpShader.reset(SkShader::CreateBitmapShader(bmp, |
- SkShader::kClamp_TileMode, |
- SkShader::kClamp_TileMode)); |
+ fBmpShader = SkShader::MakeBitmapShader(bmp, SkShader::kClamp_TileMode, |
+ SkShader::kClamp_TileMode); |
} |
enum { |
@@ -221,8 +216,8 @@ private: |
kTestsPerRow = 15, |
}; |
- SkAutoTUnref<SkShader> fBGShader; |
- SkAutoTUnref<SkShader> fBmpShader; |
+ sk_sp<SkShader> fBGShader; |
+ sk_sp<SkShader> fBmpShader; |
typedef GM INHERITED; |
}; |