Index: samplecode/SampleDegenerateTwoPtRadials.cpp |
diff --git a/samplecode/SampleDegenerateTwoPtRadials.cpp b/samplecode/SampleDegenerateTwoPtRadials.cpp |
index 32b45374e6c7642abffe6676ec94f21a1a4ef73f..f1712022491e4e23ee2e0ce43d62b5de0b0ac26b 100644 |
--- a/samplecode/SampleDegenerateTwoPtRadials.cpp |
+++ b/samplecode/SampleDegenerateTwoPtRadials.cpp |
@@ -27,12 +27,10 @@ static void draw_gradient2(SkCanvas* canvas, const SkRect& rect, SkScalar delta) |
SkPoint c1 = { l + 3 * w / 5, t + h / 2 }; |
SkScalar r0 = w / 5; |
SkScalar r1 = 2 * w / 5; |
- SkShader* s = SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1, colors, |
- pos, SK_ARRAY_COUNT(pos), |
- SkShader::kClamp_TileMode); |
SkPaint paint; |
- paint.setShader(s)->unref(); |
- |
+ paint.setShader(SkGradientShader::MakeTwoPointConical(c0, r0, c1, r1, colors, |
+ pos, SK_ARRAY_COUNT(pos), |
+ SkShader::kClamp_TileMode)); |
canvas->drawRect(rect, paint); |
} |