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