Index: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp |
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp |
index f6885408ada800410f96024d759377dbcf33cee2..09762b3326228d79775dc8c3e2ea709701e21cdb 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; |
} |