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

Unified Diff: src/core/SkModeColorFilter.h

Issue 1822623002: switch colorfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/SkDevice.cpp ('k') | src/core/SkModeColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkModeColorFilter.h
diff --git a/src/core/SkModeColorFilter.h b/src/core/SkModeColorFilter.h
index 44e618a3ad27b6a7479690e080755db6f32c5d16..d73cab7932e9fc92a3b994ac5d3637d7828bee3b 100644
--- a/src/core/SkModeColorFilter.h
+++ b/src/core/SkModeColorFilter.h
@@ -13,9 +13,14 @@
class SkModeColorFilter : public SkColorFilter {
public:
+ static sk_sp<SkColorFilter> Make(SkColor color, SkXfermode::Mode mode) {
+ return sk_sp<SkColorFilter>(new SkModeColorFilter(color, mode));
+ }
+#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
static SkColorFilter* Create(SkColor color, SkXfermode::Mode mode) {
- return new SkModeColorFilter(color, mode);
+ return Make(color, mode).release();
}
+#endif
SkColor getColor() const { return fColor; }
SkXfermode::Mode getMode() const { return fMode; }
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkModeColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698