Index: gm/srcmode.cpp |
diff --git a/gm/srcmode.cpp b/gm/srcmode.cpp |
index 28bb04bd4eab70e8ab30a5c623ec448f3a87017c..86fe89bd1a4be4e843edf2d9a1ea2ad92e6e1af8 100644 |
--- a/gm/srcmode.cpp |
+++ b/gm/srcmode.cpp |
@@ -27,8 +27,10 @@ |
static void gradient_paintproc(SkPaint* paint) { |
const SkColor colors[] = { SK_ColorGREEN, SK_ColorBLUE }; |
const SkPoint pts[] = { { 0, 0 }, { W, H } }; |
- paint->setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors), |
- SkShader::kClamp_TileMode)); |
+ SkShader* s = SkGradientShader::CreateLinear(pts, colors, nullptr, |
+ SK_ARRAY_COUNT(colors), |
+ SkShader::kClamp_TileMode); |
+ paint->setShader(s)->unref(); |
} |
typedef void (*Proc)(SkCanvas*, const SkPaint&); |