aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleDither.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-08 18:50:00 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-08 18:50:00 -0800
commit8a21c9fe7f5fef9e87115defef27bd7218419f28 (patch)
tree1dd8b9eda9eae99b33bc88b97bd5f0a7a0769dc3 /samplecode/SampleDither.cpp
parent042f859c19f71ca9feacddd1cb058ff59eed8963 (diff)
use Make instead of Create to return a shared shader
Partially updated call sites. Undefine the flag in SkSHader.h to convert the remaining sites. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1772463002 Review URL: https://codereview.chromium.org/1772463002
Diffstat (limited to 'samplecode/SampleDither.cpp')
-rw-r--r--samplecode/SampleDither.cpp5
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);