Index: gm/blurrect.cpp |
diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp |
index 55c592b6276c85008a2db9e71df1de0d1f94e358..0fe866feb2b60d26d7a7fd467d44e46df5dcf15d 100644 |
--- a/gm/blurrect.cpp |
+++ b/gm/blurrect.cpp |
@@ -58,7 +58,7 @@ static void draw_donut_skewed(SkCanvas* canvas, const SkRect& r, const SkPaint& |
/* |
* Spits out a dummy gradient to test blur with shader on paint |
*/ |
-static SkShader* MakeRadial() { |
+static sk_sp<SkShader> MakeRadial() { |
SkPoint pts[2] = { |
{ 0, 0 }, |
{ SkIntToScalar(100), SkIntToScalar(100) } |
@@ -74,10 +74,10 @@ static SkShader* MakeRadial() { |
SkScalarAve(pts[0].fY, pts[1].fY)); |
center1.set(SkScalarInterp(pts[0].fX, pts[1].fX, SkIntToScalar(3)/5), |
SkScalarInterp(pts[0].fY, pts[1].fY, SkIntToScalar(1)/4)); |
- return SkGradientShader::CreateTwoPointConical(center1, (pts[1].fX - pts[0].fX) / 7, |
- center0, (pts[1].fX - pts[0].fX) / 2, |
- colors, pos, SK_ARRAY_COUNT(colors), tm, |
- 0, &scale); |
+ return SkGradientShader::MakeTwoPointConical(center1, (pts[1].fX - pts[0].fX) / 7, |
+ center0, (pts[1].fX - pts[0].fX) / 2, |
+ colors, pos, SK_ARRAY_COUNT(colors), tm, |
+ 0, &scale); |
} |
typedef void (*PaintProc)(SkPaint*, SkScalar width); |
@@ -123,7 +123,7 @@ protected: |
paint.setAlpha(fAlpha); |
SkPaint paintWithRadial = paint; |
- paintWithRadial.setShader(MakeRadial())->unref(); |
+ paintWithRadial.setShader(MakeRadial()); |
static const Proc procs[] = { |
fill_rect, draw_donut, draw_donut_skewed |