aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-04-03 09:11:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-03 09:11:13 -0700
commit60c9b58b3214b0154c931656e91e39b230e987d8 (patch)
tree6dd59cf90dd96a443a50ae4b6fa14be6f778c823 /experimental
parentcf9bafceafaf6c0bf8b0eac8de509aa1d8407fca (diff)
change flattenable factory to return sk_sp
Diffstat (limited to 'experimental')
-rw-r--r--experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp10
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;
}