aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-04-04 12:07:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-04 12:07:47 -0700
commit4ba94e26106a4ecab4d3841d702b57487b82334e (patch)
tree9eaa8e3317d3215010245631d0d43bd596fcbd34 /tests
parent8ef9108066567cdbb6c743a68a0738a84af54008 (diff)
Switch internal testing ImageFilters over to new onFilterImage interface
Diffstat (limited to 'tests')
-rw-r--r--tests/ImageFilterTest.cpp7
-rw-r--r--tests/PDFPrimitivesTest.cpp8
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 48d3147ef9..e6430b4d87 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -60,10 +60,11 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(MatrixTestImageFilter)
protected:
- bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context& ctx,
- SkBitmap* result, SkIPoint* offset) const override {
+ sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context& ctx,
+ SkIPoint* offset) const override {
REPORTER_ASSERT(fReporter, ctx.ctm() == fExpectedMatrix);
- return true;
+ offset->fX = offset->fY = 0;
+ return sk_ref_sp<SkSpecialImage>(source);
}
void flatten(SkWriteBuffer& buffer) const override {
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index ac3b28bb16..299fcf0d21 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -21,6 +21,7 @@
#include "SkPDFUtils.h"
#include "SkReadBuffer.h"
#include "SkScalar.h"
+#include "SkSpecialImage.h"
#include "SkStream.h"
#include "SkTypes.h"
#include "Test.h"
@@ -373,12 +374,11 @@ public:
bool visited() const { return fVisited; }
protected:
- bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,
- SkBitmap* result, SkIPoint* offset) const override {
+ sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
+ SkIPoint* offset) const override {
fVisited = true;
offset->fX = offset->fY = 0;
- *result = src;
- return true;
+ return sk_ref_sp<SkSpecialImage>(source);
}
private: