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

Unified Diff: src/core/SkBitmapProcShader.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 | « samplecode/ClockFaceView.cpp ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcShader.cpp
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 14114c08937bed7697a6ebf15f9fb23acbee0ff6..c9df4ce248c7c6d6b5a3f947f26aaa36b56d3065 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -275,7 +275,7 @@ bool SkBitmapProcShader::onIsABitmap(SkBitmap* texture, SkMatrix* texM, TileMode
return true;
}
-SkFlattenable* SkBitmapProcShader::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkBitmapProcShader::CreateProc(SkReadBuffer& buffer) {
SkMatrix lm;
buffer.readMatrix(&lm);
SkBitmap bm;
@@ -285,7 +285,7 @@ SkFlattenable* SkBitmapProcShader::CreateProc(SkReadBuffer& buffer) {
bm.setImmutable();
TileMode mx = (TileMode)buffer.readUInt();
TileMode my = (TileMode)buffer.readUInt();
- return SkShader::MakeBitmapShader(bm, mx, my, &lm).release();
+ return SkShader::MakeBitmapShader(bm, mx, my, &lm);
}
void SkBitmapProcShader::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « samplecode/ClockFaceView.cpp ('k') | src/core/SkBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698