Index: include/effects/SkArithmeticMode.h |
diff --git a/include/effects/SkArithmeticMode.h b/include/effects/SkArithmeticMode.h |
index 9e8df2e5cf7c26d5f2bbbca1aa81c80c458ae22a..b160dc7e9bf2544fcc68e2be66fae1adbdf06a1a 100644 |
--- a/include/effects/SkArithmeticMode.h |
+++ b/include/effects/SkArithmeticMode.h |
@@ -10,8 +10,7 @@ |
#include "SkFlattenable.h" |
#include "SkScalar.h" |
- |
-class SkXfermode; |
+#include "SkXfermode.h" |
class SK_API SkArithmeticMode { |
public: |
@@ -22,9 +21,15 @@ public: |
* k1=k3=k4=0, k2=1.0 results in returning the src |
* k1=k2=k4=0, k3=1.0 results in returning the dst |
*/ |
+ static sk_sp<SkXfermode> Make(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4, |
+ bool enforcePMColor = true); |
+#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR |
static SkXfermode* Create(SkScalar k1, SkScalar k2, |
SkScalar k3, SkScalar k4, |
- bool enforcePMColor = true); |
+ bool enforcePMColor = true) { |
+ return Make(k1, k2, k3, k4, enforcePMColor).release(); |
+ } |
+#endif |
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP(); |