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

Unified Diff: src/core/SkShader.cpp

Issue 1789443002: Revert "Revert of add Make variations to return SkImage by sk_sp (patchset #5 id:80001 of https://c… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use get, not release, when calling legacy function that wants ptr 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/core/SkReadBuffer.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 7b322fb6272e0f9017005191f3a3a54f235549a5..1413a6ee7336aecd60762c71c11889def7f7c04d 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -238,7 +238,7 @@ sk_sp<SkShader> SkShader::MakeBitmapShader(const SkBitmap& src, TileMode tmx, Ti
return SkMakeBitmapShader(src, tmx, tmy, localMatrix, nullptr);
}
-sk_sp<SkShader> SkShader::MakePictureShader(sk_sp<const SkPicture> src, TileMode tmx, TileMode tmy,
+sk_sp<SkShader> SkShader::MakePictureShader(sk_sp<SkPicture> src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix, const SkRect* tile) {
return SkPictureShader::Make(std::move(src), tmx, tmy, localMatrix, tile);
}
@@ -388,6 +388,7 @@ SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode
}
SkShader* SkShader::CreatePictureShader(const SkPicture* src, TileMode tmx, TileMode tmy,
const SkMatrix* localMatrix, const SkRect* tile) {
- return MakePictureShader(sk_ref_sp(src), tmx, tmy, localMatrix, tile).release();
+ return MakePictureShader(sk_ref_sp(const_cast<SkPicture*>(src)), tmx, tmy,
+ localMatrix, tile).release();
}
#endif
« no previous file with comments | « src/core/SkReadBuffer.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698