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

Unified Diff: src/core/SkComposeShader.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/core/SkColorMatrixFilterRowMajor255.cpp ('k') | src/core/SkLightingShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkComposeShader.cpp
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index f39f20c46cefa7b8fb25107a4d23babe54031696..46b7724944676a297b5745b4f658ec40dd34ca5c 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -39,14 +39,14 @@ private:
};
#define SkAutoAlphaRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoAlphaRestore)
-SkFlattenable* SkComposeShader::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkComposeShader::CreateProc(SkReadBuffer& buffer) {
sk_sp<SkShader> shaderA(buffer.readShader());
sk_sp<SkShader> shaderB(buffer.readShader());
sk_sp<SkXfermode> mode(buffer.readXfermode());
if (!shaderA || !shaderB) {
return nullptr;
}
- return new SkComposeShader(std::move(shaderA), std::move(shaderB), std::move(mode));
+ return sk_make_sp<SkComposeShader>(std::move(shaderA), std::move(shaderB), std::move(mode));
}
void SkComposeShader::flatten(SkWriteBuffer& buffer) const {
« no previous file with comments | « src/core/SkColorMatrixFilterRowMajor255.cpp ('k') | src/core/SkLightingShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698