diff options
author | reed <reed@google.com> | 2016-04-03 09:11:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-03 09:11:13 -0700 |
commit | 60c9b58b3214b0154c931656e91e39b230e987d8 (patch) | |
tree | 6dd59cf90dd96a443a50ae4b6fa14be6f778c823 /experimental | |
parent | cf9bafceafaf6c0bf8b0eac8de509aa1d8407fca (diff) |
change flattenable factory to return sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1855733002
Review URL: https://codereview.chromium.org/1855733002
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp index f6885408ad..09762b3326 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp @@ -352,7 +352,7 @@ SkPerlinNoiseShader2::SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkPerlinNoiseShader2::~SkPerlinNoiseShader2() { } -SkFlattenable* SkPerlinNoiseShader2::CreateProc(SkReadBuffer& buffer) { +sk_sp<SkFlattenable> SkPerlinNoiseShader2::CreateProc(SkReadBuffer& buffer) { Type type = (Type)buffer.readInt(); SkScalar freqX = buffer.readScalar(); SkScalar freqY = buffer.readScalar(); @@ -364,13 +364,11 @@ SkFlattenable* SkPerlinNoiseShader2::CreateProc(SkReadBuffer& buffer) { switch (type) { case kFractalNoise_Type: - return SkPerlinNoiseShader2::MakeFractalNoise(freqX, freqY, octaves, seed, - &tileSize).release(); + return SkPerlinNoiseShader2::MakeFractalNoise(freqX, freqY, octaves, seed, &tileSize); case kTurbulence_Type: - return SkPerlinNoiseShader2::MakeTubulence(freqX, freqY, octaves, seed, - &tileSize).release(); + return SkPerlinNoiseShader2::MakeTubulence(freqX, freqY, octaves, seed, &tileSize); case kImprovedNoise_Type: - return SkPerlinNoiseShader2::MakeImprovedNoise(freqX, freqY, octaves, seed).release(); + return SkPerlinNoiseShader2::MakeImprovedNoise(freqX, freqY, octaves, seed); default: return nullptr; } |