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; } |