Index: gm/imagefilterstransformed.cpp |
diff --git a/gm/imagefilterstransformed.cpp b/gm/imagefilterstransformed.cpp |
index 5b9d702efb0f9e40049c9c1294c2c06fc9bd6138..8e59b9242c4b0545bc1133c3a1698cf7130cd4cd 100644 |
--- a/gm/imagefilterstransformed.cpp |
+++ b/gm/imagefilterstransformed.cpp |
@@ -36,9 +36,12 @@ |
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(); |