diff options
Diffstat (limited to 'samplecode/SampleDither.cpp')
-rw-r--r-- | samplecode/SampleDither.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/samplecode/SampleDither.cpp b/samplecode/SampleDither.cpp index 8c14fb5110..a599418723 100644 --- a/samplecode/SampleDither.cpp +++ b/samplecode/SampleDither.cpp @@ -34,9 +34,8 @@ static void draw_sweep(SkCanvas* c, int width, int height, SkScalar angle) { // SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN, SK_ColorCYAN }; SkColor colors[] = { 0x4c737373, 0x4c737373, 0xffffd300 }; - SkShader* s = SkGradientShader::CreateSweep(r.centerX(), r.centerY(), - colors, nullptr, SK_ARRAY_COUNT(colors)); - p.setShader(s)->unref(); + p.setShader(SkGradientShader::MakeSweep(r.centerX(), r.centerY(), + colors, nullptr, SK_ARRAY_COUNT(colors))); SkAutoCanvasRestore acr(c, true); |