Index: gm/alphagradients.cpp |
diff --git a/gm/alphagradients.cpp b/gm/alphagradients.cpp |
index 71ec27c975096031d461a50f9de4d3aba8985658..65fa0c4082daf3df93b7e726731846558ea0bf03 100644 |
--- a/gm/alphagradients.cpp |
+++ b/gm/alphagradients.cpp |
@@ -28,9 +28,8 @@ protected: |
SkPoint pts[] = { { r.fLeft, r.fTop }, { r.fRight, r.fBottom } }; |
SkPaint paint; |
uint32_t flags = doPreMul ? SkGradientShader::kInterpolateColorsInPremul_Flag : 0; |
- SkShader* s = SkGradientShader::CreateLinear(pts, colors, nullptr, 2, |
- SkShader::kClamp_TileMode, flags, nullptr); |
- paint.setShader(s)->unref(); |
+ paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, |
+ SkShader::kClamp_TileMode, flags, nullptr)); |
canvas->drawRect(r, paint); |
paint.setShader(nullptr); |