diff options
author | reed <reed@google.com> | 2016-03-08 18:50:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-08 18:50:00 -0800 |
commit | 8a21c9fe7f5fef9e87115defef27bd7218419f28 (patch) | |
tree | 1dd8b9eda9eae99b33bc88b97bd5f0a7a0769dc3 /samplecode/SampleBitmapRect.cpp | |
parent | 042f859c19f71ca9feacddd1cb058ff59eed8963 (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/SampleBitmapRect.cpp')
-rw-r--r-- | samplecode/SampleBitmapRect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp index d7eed02ef9..490c6a45c3 100644 --- a/samplecode/SampleBitmapRect.cpp +++ b/samplecode/SampleBitmapRect.cpp @@ -37,8 +37,8 @@ static void make_bitmap(SkBitmap* bitmap) { paint.setAntiAlias(true); const SkPoint pts[] = { { 0, 0 }, { SCALAR_SIZE, SCALAR_SIZE } }; const SkColor colors[] = { SK_ColorWHITE, SK_ColorBLUE }; - paint.setShader(SkGradientShader::CreateLinear(pts, colors, nullptr, 2, - SkShader::kClamp_TileMode))->unref(); + paint.setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, 2, + SkShader::kClamp_TileMode)); canvas.drawCircle(SCALAR_SIZE/2, SCALAR_SIZE/2, SCALAR_SIZE/2, paint); } |