Index: include/effects/SkXfermodeImageFilter.h |
diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h |
index f1e5d71070a9537300dbe62d2ff40d23650b0a8b..634422747a9b86af7d0a4fc6908e225f4affa419 100644 |
--- a/include/effects/SkXfermodeImageFilter.h |
+++ b/include/effects/SkXfermodeImageFilter.h |
@@ -21,19 +21,35 @@ class SK_API SkXfermodeImageFilter : public SkImageFilter { |
*/ |
public: |
- static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, SkImageFilter* background, |
- SkImageFilter* foreground, const CropRect* cropRect); |
- static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, SkImageFilter* background) { |
- return Make(std::move(mode), background, nullptr, nullptr); |
+ static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, sk_sp<SkImageFilter> background, |
+ sk_sp<SkImageFilter> foreground, const CropRect* cropRect); |
+ static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, sk_sp<SkImageFilter> background) { |
+ return Make(std::move(mode), std::move(background), nullptr, nullptr); |
} |
+ |
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR |
static SkImageFilter* Create(SkXfermode* mode, SkImageFilter* background, |
SkImageFilter* foreground = NULL, |
const CropRect* cropRect = NULL) { |
- return Make(sk_ref_sp(mode), background, foreground, cropRect).release(); |
+ return Make(sk_ref_sp(mode), |
+ sk_ref_sp(background), |
+ sk_ref_sp(foreground), |
+ cropRect).release(); |
} |
#endif |
- |
+#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR |
+ static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, SkImageFilter* background, |
+ SkImageFilter* foreground, const CropRect* cropRect) { |
+ return Make(std::move(mode), |
+ sk_ref_sp(background), |
+ sk_ref_sp(foreground), |
+ cropRect); |
+ } |
+ static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, SkImageFilter* background) { |
+ return Make(std::move(mode), sk_ref_sp(background)); |
+ } |
+#endif |
+ |
SK_TO_STRING_OVERRIDE() |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) |
@@ -49,7 +65,7 @@ public: |
#endif |
protected: |
- SkXfermodeImageFilter(sk_sp<SkXfermode> mode, SkImageFilter* inputs[2], |
+ SkXfermodeImageFilter(sk_sp<SkXfermode> mode, sk_sp<SkImageFilter> inputs[2], |
const CropRect* cropRect); |
void flatten(SkWriteBuffer&) const override; |