diff options
author | robertphillips <robertphillips@google.com> | 2016-04-04 12:07:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-04 12:07:47 -0700 |
commit | 4ba94e26106a4ecab4d3841d702b57487b82334e (patch) | |
tree | 9eaa8e3317d3215010245631d0d43bd596fcbd34 /gm/imagefiltersbase.cpp | |
parent | 8ef9108066567cdbb6c743a68a0738a84af54008 (diff) |
Switch internal testing ImageFilters over to new onFilterImage interface
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854133002
Review URL: https://codereview.chromium.org/1854133002
Diffstat (limited to 'gm/imagefiltersbase.cpp')
-rw-r--r-- | gm/imagefiltersbase.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp index be4325ef1f..e2e92356e0 100644 --- a/gm/imagefiltersbase.cpp +++ b/gm/imagefiltersbase.cpp @@ -14,6 +14,7 @@ #include "SkBlurImageFilter.h" #include "SkColorFilterImageFilter.h" #include "SkDropShadowImageFilter.h" +#include "SkSpecialImage.h" #include "SkTestImageFilters.h" class FailImageFilter : public SkImageFilter { @@ -36,9 +37,9 @@ public: protected: FailImageFilter() : INHERITED(nullptr, 0, nullptr) {} - bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const override { - return false; + sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, + SkIPoint* offset) const override { + return nullptr; } private: @@ -77,11 +78,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter) protected: - bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const override { - *result = src; + sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, + SkIPoint* offset) const override { offset->set(0, 0); - return true; + return sk_ref_sp<SkSpecialImage>(source); } private: |