aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefilterscropexpand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/imagefilterscropexpand.cpp')
-rw-r--r--gm/imagefilterscropexpand.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gm/imagefilterscropexpand.cpp b/gm/imagefilterscropexpand.cpp
index 185bbde0a6..9ceab2036a 100644
--- a/gm/imagefilterscropexpand.cpp
+++ b/gm/imagefilterscropexpand.cpp
@@ -151,9 +151,12 @@ private:
SkColor colors[2];
colors[0] = SK_ColorWHITE;
colors[1] = SK_ColorBLACK;
+ SkAutoTUnref<SkShader> shader(
+ SkGradientShader::CreateRadial(SkPoint::Make(x, y), radius, colors, nullptr, 2,
+ SkShader::kClamp_TileMode)
+ );
SkPaint paint;
- paint.setShader(SkGradientShader::MakeRadial(SkPoint::Make(x, y), radius, colors, nullptr,
- 2, SkShader::kClamp_TileMode));
+ paint.setShader(shader);
canvas->drawCircle(x, y, radius, paint);
return surface->newImageSnapshot();