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

Unified Diff: src/image/SkImageShader.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/gradients/SkTwoPointConicalGradient.cpp ('k') | src/utils/SkBitmapSourceDeserializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImageShader.cpp
diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp
index 00c038ab88511fb86c3f6aef4e12f96cb4242090..d12ee030a2a19a921a75d778e5521626a0f8a589 100644
--- a/src/image/SkImageShader.cpp
+++ b/src/image/SkImageShader.cpp
@@ -19,7 +19,7 @@ SkImageShader::SkImageShader(const SkImage* img, TileMode tmx, TileMode tmy, con
, fTileModeY(tmy)
{}
-SkFlattenable* SkImageShader::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkImageShader::CreateProc(SkReadBuffer& buffer) {
const TileMode tx = (TileMode)buffer.readUInt();
const TileMode ty = (TileMode)buffer.readUInt();
SkMatrix matrix;
@@ -28,7 +28,7 @@ SkFlattenable* SkImageShader::CreateProc(SkReadBuffer& buffer) {
if (!img) {
return nullptr;
}
- return SkImageShader::Make(img, tx, ty, &matrix).release();
+ return SkImageShader::Make(img, tx, ty, &matrix);
}
void SkImageShader::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | src/utils/SkBitmapSourceDeserializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698