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

Unified Diff: gm/imagefiltersbase.cpp

Issue 1854133002: Switch internal testing ImageFilters over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 8 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
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | gm/imagefiltersgraph.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersbase.cpp
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index be4325ef1fffa2ca65c0ebbdcd2ebfacf513296b..e2e92356e09f49e0777032e82a3c3d115ebc0d4b 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);
Stephen White 2016/04/04 17:02:42 Let's not do this until we get the null_ptr-as-tra
robertphillips 2016/04/04 18:08:31 I seems like this is actually what this test image
Stephen White 2016/04/04 18:43:15 Oh! Yeah, I guess it does. It's returning the sour
}
private:
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | gm/imagefiltersgraph.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698