diff options
-rw-r--r-- | gm/drawfilter.cpp | 3 | ||||
-rw-r--r-- | tests/CanvasStateTest.cpp | 4 | ||||
-rw-r--r-- | tests/CanvasTest.cpp | 3 | ||||
-rw-r--r-- | tests/DrawFilterTest.cpp | 4 |
4 files changed, 14 insertions, 0 deletions
diff --git a/gm/drawfilter.cpp b/gm/drawfilter.cpp index cd1bbb0c16..d17eb4f52f 100644 --- a/gm/drawfilter.cpp +++ b/gm/drawfilter.cpp @@ -12,6 +12,8 @@ #include "SkDrawFilter.h" #include "SkPaint.h" +#ifdef SK_SUPPORT_LEGACY_DRAWFILTER + /** * Initial test coverage for SkDrawFilter. * Draws two rectangles; if draw filters are broken, they will match. @@ -70,3 +72,4 @@ private: DEF_GM( return new DrawFilterGM; ) +#endif diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp index bd7c325ca2..cd7a4184eb 100644 --- a/tests/CanvasStateTest.cpp +++ b/tests/CanvasStateTest.cpp @@ -262,6 +262,8 @@ DEF_TEST(CanvasState_test_complex_clips, reporter) { //////////////////////////////////////////////////////////////////////////////// +#ifdef SK_SUPPORT_LEGACY_DRAWFILTER + class TestDrawFilter : public SkDrawFilter { public: bool filter(SkPaint*, Type) override { return true; } @@ -287,6 +289,8 @@ DEF_TEST(CanvasState_test_draw_filters, reporter) { SkCanvasStateUtils::ReleaseCanvasState(state); } +#endif + //////////////////////////////////////////////////////////////////////////////// // we need this function to prevent SkError from printing to stdout diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 774e85d242..2390c7455f 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -515,8 +515,11 @@ static void AssertCanvasStatesEqual(skiatest::Reporter* reporter, const TestData REPORTER_ASSERT_MESSAGE(reporter, bounds1 == bounds2, testStep->assertMessage()); +#ifdef SK_SUPPORT_LEGACY_DRAWFILTER REPORTER_ASSERT_MESSAGE(reporter, canvas1->getDrawFilter() == canvas2->getDrawFilter(), testStep->assertMessage()); +#endif + SkIRect deviceBounds1, deviceBounds2; REPORTER_ASSERT_MESSAGE(reporter, canvas1->getClipDeviceBounds(&deviceBounds1) == diff --git a/tests/DrawFilterTest.cpp b/tests/DrawFilterTest.cpp index 6381a3c8fa..f3e0a77306 100644 --- a/tests/DrawFilterTest.cpp +++ b/tests/DrawFilterTest.cpp @@ -10,6 +10,8 @@ #include "SkSurface.h" #include "Test.h" +#ifdef SK_SUPPORT_LEGACY_DRAWFILTER + namespace { class TestFilter : public SkDrawFilter { public: @@ -43,3 +45,5 @@ static void test_saverestore(skiatest::Reporter* reporter) { DEF_TEST(DrawFilter, reporter) { test_saverestore(reporter); } + +#endif |