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

Unified Diff: include/effects/SkArithmeticMode.h

Issue 1832223002: switch xfermodes over 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
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();

Powered by Google App Engine
This is Rietveld 408576698