Index: gm/verylargebitmap.cpp |
diff --git a/gm/verylargebitmap.cpp b/gm/verylargebitmap.cpp |
index ab6821dc1abc651b01b40e57a9075a3afcb11145..5c67e77e3e99eef57c35ccf386266125e822ef2d 100644 |
--- a/gm/verylargebitmap.cpp |
+++ b/gm/verylargebitmap.cpp |
@@ -15,9 +15,10 @@ |
static void draw(SkCanvas* canvas, int width, int height, SkColor colors[2]) { |
const SkPoint center = { SkIntToScalar(width)/2, SkIntToScalar(height)/2 }; |
const SkScalar radius = 40; |
+ SkShader* shader = SkGradientShader::CreateRadial(center, radius, colors, nullptr, 2, |
+ SkShader::kMirror_TileMode); |
SkPaint paint; |
- paint.setShader(SkGradientShader::MakeRadial(center, radius, colors, nullptr, 2, |
- SkShader::kMirror_TileMode)); |
+ paint.setShader(shader)->unref(); |
paint.setXfermodeMode(SkXfermode::kSrc_Mode); |
canvas->drawPaint(paint); |
} |