Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: src/effects/SkPerlinNoiseShader.cpp

Issue 1855733002: change flattenable factory to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPerlinNoiseShader.cpp
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 72b7e0280da12bb67d2d05c38b1b902d6ae2675a..c8b04c997521e7f91772db542801ac28264c4fa0 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -286,7 +286,7 @@ SkPerlinNoiseShader::SkPerlinNoiseShader(SkPerlinNoiseShader::Type type,
SkPerlinNoiseShader::~SkPerlinNoiseShader() {
}
-SkFlattenable* SkPerlinNoiseShader::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkPerlinNoiseShader::CreateProc(SkReadBuffer& buffer) {
Type type = (Type)buffer.readInt();
SkScalar freqX = buffer.readScalar();
SkScalar freqY = buffer.readScalar();
@@ -299,10 +299,10 @@ SkFlattenable* SkPerlinNoiseShader::CreateProc(SkReadBuffer& buffer) {
switch (type) {
case kFractalNoise_Type:
return SkPerlinNoiseShader::MakeFractalNoise(freqX, freqY, octaves, seed,
- &tileSize).release();
+ &tileSize);
case kTurbulence_Type:
return SkPerlinNoiseShader::MakeTurbulence(freqX, freqY, octaves, seed,
- &tileSize).release();
+ &tileSize);
default:
return nullptr;
}
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698