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

Unified Diff: gm/dcshader.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 | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | gm/imagefiltersbase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dcshader.cpp
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 487f7671eef62c6b7f2be3e76f8afda3189d60c8..e402fc0c2b7ee69ea62749a2806b9383e5ee1d80 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -50,10 +50,10 @@ private:
const SkMatrix fDeviceMatrix;
};
-SkFlattenable* DCShader::CreateProc(SkReadBuffer& buf) {
+sk_sp<SkFlattenable> DCShader::CreateProc(SkReadBuffer& buf) {
SkMatrix matrix;
buf.readMatrix(&matrix);
- return new DCShader(matrix);
+ return sk_make_sp<DCShader>(matrix);
}
class DCFP : public GrFragmentProcessor {
« no previous file with comments | « experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp ('k') | gm/imagefiltersbase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698