Index: gm/xfermodes3.cpp |
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp |
index 4cd05df5c40c4f436209393f67b33d3bbe8750c1..8c24bf72d1abb80f823d95df71c51445da7b4fe4 100644 |
--- a/gm/xfermodes3.cpp |
+++ b/gm/xfermodes3.cpp |
@@ -185,17 +185,21 @@ |
SkMatrix lm; |
lm.setScale(SkIntToScalar(kCheckSize), SkIntToScalar(kCheckSize)); |
- fBGShader = SkShader::MakeBitmapShader(bg, SkShader::kRepeat_TileMode, |
- SkShader::kRepeat_TileMode, &lm); |
+ fBGShader.reset(SkShader::CreateBitmapShader(bg, |
+ SkShader::kRepeat_TileMode, |
+ SkShader::kRepeat_TileMode, |
+ &lm)); |
SkPaint bmpPaint; |
- 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)); |
+ 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(); |
SkBitmap bmp; |
bmp.allocN32Pixels(kSize, kSize); |
@@ -206,8 +210,9 @@ |
7 * SkIntToScalar(kSize) / 8, 7 * SkIntToScalar(kSize) / 8}; |
bmpCanvas.drawRect(rect, bmpPaint); |
- fBmpShader = SkShader::MakeBitmapShader(bmp, SkShader::kClamp_TileMode, |
- SkShader::kClamp_TileMode); |
+ fBmpShader.reset(SkShader::CreateBitmapShader(bmp, |
+ SkShader::kClamp_TileMode, |
+ SkShader::kClamp_TileMode)); |
} |
enum { |
@@ -216,8 +221,8 @@ |
kTestsPerRow = 15, |
}; |
- sk_sp<SkShader> fBGShader; |
- sk_sp<SkShader> fBmpShader; |
+ SkAutoTUnref<SkShader> fBGShader; |
+ SkAutoTUnref<SkShader> fBmpShader; |
typedef GM INHERITED; |
}; |