Index: gm/texturedomaineffect.cpp |
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp |
index 6bd6490c660ba7064bff0a873b632474210832b0..72e40feb49396221fc29788b7d94ec16f8459a18 100644 |
--- a/gm/texturedomaineffect.cpp |
+++ b/gm/texturedomaineffect.cpp |
@@ -50,24 +50,24 @@ |
SkPaint paint; |
SkColor colors1[] = { SK_ColorCYAN, SK_ColorLTGRAY, SK_ColorGRAY }; |
- paint.setShader(SkGradientShader::MakeSweep(65.f, 75.f, colors1, nullptr, |
- SK_ARRAY_COUNT(colors1))); |
- canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, fBmp.width() + 10.f, fBmp.height() + 10.f), |
- paint); |
+ paint.setShader(SkGradientShader::CreateSweep(65.f, 75.f, colors1, |
+ nullptr, SK_ARRAY_COUNT(colors1)))->unref(); |
+ canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, |
+ fBmp.width() + 10.f, fBmp.height() + 10.f), paint); |
SkColor colors2[] = { SK_ColorMAGENTA, SK_ColorLTGRAY, SK_ColorYELLOW }; |
- paint.setShader(SkGradientShader::MakeSweep(45.f, 55.f, colors2, nullptr, |
- SK_ARRAY_COUNT(colors2))); |
+ paint.setShader(SkGradientShader::CreateSweep(45.f, 55.f, colors2, nullptr, |
+ SK_ARRAY_COUNT(colors2)))->unref(); |
paint.setXfermodeMode(SkXfermode::kDarken_Mode); |
- canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, fBmp.width() + 10.f, fBmp.height() + 10.f), |
- paint); |
+ canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, |
+ fBmp.width() + 10.f, fBmp.height() + 10.f), paint); |
SkColor colors3[] = { SK_ColorBLUE, SK_ColorLTGRAY, SK_ColorGREEN }; |
- paint.setShader(SkGradientShader::MakeSweep(25.f, 35.f, colors3, nullptr, |
- SK_ARRAY_COUNT(colors3))); |
+ paint.setShader(SkGradientShader::CreateSweep(25.f, 35.f, colors3, nullptr, |
+ SK_ARRAY_COUNT(colors3)))->unref(); |
paint.setXfermodeMode(SkXfermode::kLighten_Mode); |
- canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, fBmp.width() + 10.f, fBmp.height() + 10.f), |
- paint); |
+ canvas.drawOval(SkRect::MakeXYWH(-5.f, -5.f, |
+ fBmp.width() + 10.f, fBmp.height() + 10.f), paint); |
} |
void onDraw(SkCanvas* canvas) override { |