Index: gm/lcdblendmodes.cpp |
diff --git a/gm/lcdblendmodes.cpp b/gm/lcdblendmodes.cpp |
index d7a9024204bffbbfeea4abbe3269a6e51623fbb2..c3fe9ff1493f39add95bdeaa719f15064a32abb2 100644 |
--- a/gm/lcdblendmodes.cpp |
+++ b/gm/lcdblendmodes.cpp |
@@ -22,7 +22,7 @@ static const int kNumCols = 4; |
static const int kWidth = kColWidth * kNumCols; |
static const int kHeight = 750; |
-static SkShader* make_shader(const SkRect& bounds) { |
+static sk_sp<SkShader> make_shader(const SkRect& bounds) { |
const SkPoint pts[] = { |
{ bounds.left(), bounds.top() }, |
{ bounds.right(), bounds.bottom() }, |
@@ -30,9 +30,8 @@ static SkShader* make_shader(const SkRect& bounds) { |
const SkColor colors[] = { |
SK_ColorRED, SK_ColorGREEN, |
}; |
- return SkGradientShader::CreateLinear(pts, |
- colors, nullptr, SK_ARRAY_COUNT(colors), |
- SkShader::kRepeat_TileMode); |
+ return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors), |
+ SkShader::kRepeat_TileMode); |
} |
class LcdBlendGM : public skiagm::GM { |
@@ -136,7 +135,7 @@ protected: |
if (useGrad) { |
SkRect r; |
r.setXYWH(0, y - fTextHeight, SkIntToScalar(kColWidth), fTextHeight); |
- paint.setShader(make_shader(r))->unref(); |
+ paint.setShader(make_shader(r)); |
} |
SkString string(gModes[m].fLabel); |
canvas->drawText(gModes[m].fLabel, string.size(), 0, y, paint); |