aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/rects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/rects.cpp')
-rw-r--r--gm/rects.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/gm/rects.cpp b/gm/rects.cpp
index 38108fed22..6f4c75e22f 100644
--- a/gm/rects.cpp
+++ b/gm/rects.cpp
@@ -80,13 +80,9 @@ protected:
SkPoint center = SkPoint::Make(SkIntToScalar(-5), SkIntToScalar(30));
SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN };
SkScalar pos[] = { 0, SK_ScalarHalf, SK_Scalar1 };
- SkShader* s = SkGradientShader::CreateRadial(center,
- SkIntToScalar(20),
- colors,
- pos,
- SK_ARRAY_COUNT(colors),
- SkShader::kClamp_TileMode);
- p.setShader(s)->unref();
+ p.setShader(SkGradientShader::MakeRadial(center, 20, colors, pos,
+ SK_ARRAY_COUNT(colors),
+ SkShader::kClamp_TileMode));
fPaints.push_back(p);
}