Index: samplecode/Sample2PtRadial.cpp |
diff --git a/samplecode/Sample2PtRadial.cpp b/samplecode/Sample2PtRadial.cpp |
index 07efd0a41c78a3d88500d26ed972a159a973f50f..c32025e9cbd94b47ca6f60515fd4f82b2c241781 100644 |
--- a/samplecode/Sample2PtRadial.cpp |
+++ b/samplecode/Sample2PtRadial.cpp |
@@ -33,12 +33,10 @@ protected: |
SkScalar r0 = 100; |
SkPoint c1 = { 100, 100 }; |
SkScalar r1 = 100; |
- SkShader* s = SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1, colors, |
- nullptr, 2, |
- SkShader::kClamp_TileMode); |
- |
SkPaint paint; |
- paint.setShader(s)->unref(); |
+ paint.setShader(SkGradientShader::MakeTwoPointConical(c0, r0, c1, r1, colors, |
+ nullptr, 2, |
+ SkShader::kClamp_TileMode)); |
canvas->drawPaint(paint); |
} |