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.h

Issue 1772463002: use Make instead of Create to return a shared shader (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/SkColorFilterShader.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkComposeShader.h
diff --git a/src/core/SkComposeShader.h b/src/core/SkComposeShader.h
index 9220a0de97ccbac9619558614caf96861af538f6..ee6e36a222b3a1161ecf971a0b203e48cac39af2 100644
--- a/src/core/SkComposeShader.h
+++ b/src/core/SkComposeShader.h
@@ -31,7 +31,7 @@ public:
@param mode The xfermode that combines the colors from the two shaders. If mode
is null, then SRC_OVER is assumed.
*/
- SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL);
+ SkComposeShader(sk_sp<SkShader> sA, sk_sp<SkShader> sB, SkXfermode* mode = NULL);
virtual ~SkComposeShader();
#if SK_SUPPORT_GPU
@@ -63,8 +63,8 @@ public:
};
#ifdef SK_DEBUG
- SkShader* getShaderA() { return fShaderA; }
- SkShader* getShaderB() { return fShaderB; }
+ SkShader* getShaderA() { return fShaderA.get(); }
+ SkShader* getShaderB() { return fShaderB.get(); }
#endif
bool asACompose(ComposeRec* rec) const override;
@@ -79,9 +79,9 @@ protected:
Context* onCreateContext(const ContextRec&, void*) const override;
private:
- SkShader* fShaderA;
- SkShader* fShaderB;
- SkXfermode* fMode;
+ sk_sp<SkShader> fShaderA;
+ sk_sp<SkShader> fShaderB;
+ SkXfermode* fMode;
typedef SkShader INHERITED;
};
« no previous file with comments | « src/core/SkColorFilterShader.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698