diff options
author | Mike Reed <reed@google.com> | 2016-09-26 15:33:00 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-09-26 20:00:07 +0000 |
commit | 0530c88067211818f7ce7bbfc0e92f3bdebc1f2b (patch) | |
tree | eb120688e15ad6bded6417bcad13c133efd2d8e8 /include | |
parent | 21112deff825f6603904e5d1882dd3c2dc4c1ea8 (diff) |
replace Arithmetic xfermode with imagefilter
chrome pre-cl: https://codereview.chromium.org/2369023002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2595
Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4
Reviewed-on: https://skia-review.googlesource.com/2595
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/effects/SkArithmeticMode.h | 4 | ||||
-rw-r--r-- | include/effects/SkXfermodeImageFilter.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/effects/SkArithmeticMode.h b/include/effects/SkArithmeticMode.h index b160dc7e9b..81b9f85394 100644 --- a/include/effects/SkArithmeticMode.h +++ b/include/effects/SkArithmeticMode.h @@ -12,6 +12,8 @@ #include "SkScalar.h" #include "SkXfermode.h" +#ifdef SK_SUPPORT_LEGACY_ARITHMETICMODE + class SK_API SkArithmeticMode { public: /** @@ -38,3 +40,5 @@ private: }; #endif + +#endif diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h index e39157550c..6066b8d2e0 100644 --- a/include/effects/SkXfermodeImageFilter.h +++ b/include/effects/SkXfermodeImageFilter.h @@ -26,6 +26,18 @@ public: return Make(std::move(mode), std::move(background), nullptr, nullptr); } + static sk_sp<SkImageFilter> MakeArithmetic(float k1, float k2, float k3, float k4, + bool enforcePMColor, + sk_sp<SkImageFilter> background, + sk_sp<SkImageFilter> foreground, + const SkImageFilter::CropRect* cropRect); + static sk_sp<SkImageFilter> MakeArithmetic(float k1, float k2, float k3, float k4, + bool enforcePMColor, + sk_sp<SkImageFilter> background) { + return MakeArithmetic(k1, k2, k3, k4, enforcePMColor, std::move(background), + nullptr, nullptr); + } + #ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR static SkImageFilter* Create(SkXfermode* mode, SkImageFilter* background, SkImageFilter* foreground = NULL, |