Index: gm/colorfilters.cpp |
diff --git a/gm/colorfilters.cpp b/gm/colorfilters.cpp |
index dcd24d9ce431536dbcd1a84b319985de86f5edb4..eaee39dd55b729df124a2e7fc1b3f58a27059e2d 100644 |
--- a/gm/colorfilters.cpp |
+++ b/gm/colorfilters.cpp |
@@ -10,7 +10,7 @@ |
#include "SkColorMatrixFilter.h" |
#include "SkGradientShader.h" |
-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() }, |
@@ -19,9 +19,8 @@ static SkShader* make_shader(const SkRect& bounds) { |
SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorBLACK, |
SK_ColorCYAN, SK_ColorMAGENTA, SK_ColorYELLOW, |
}; |
- return SkGradientShader::CreateLinear(pts, |
- colors, nullptr, SK_ARRAY_COUNT(colors), |
- SkShader::kClamp_TileMode); |
+ return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors), |
+ SkShader::kClamp_TileMode); |
} |
typedef void (*InstallPaint)(SkPaint*, uint32_t, uint32_t); |
@@ -53,7 +52,7 @@ protected: |
SkPaint paint; |
SkRect r; |
r.setWH(600, 50); |
- paint.setShader(make_shader(r))->unref(); |
+ paint.setShader(make_shader(r)); |
const struct { |
InstallPaint fProc; |