Fixes Google3 dm build. (Can't enable SK_INTERNAL for Google3 dm without enabling it for all dependents.)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1626543002
Review URL: https://codereview.chromium.org/
1626543002
#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.
DEF_GM( return new DrawFilterGM; )
+#endif
////////////////////////////////////////////////////////////////////////////////
+#ifdef SK_SUPPORT_LEGACY_DRAWFILTER
+
class TestDrawFilter : public SkDrawFilter {
public:
bool filter(SkPaint*, Type) override { return true; }
SkCanvasStateUtils::ReleaseCanvasState(state);
}
+#endif
+
////////////////////////////////////////////////////////////////////////////////
// we need this function to prevent SkError from printing to stdout
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) ==
#include "SkSurface.h"
#include "Test.h"
+#ifdef SK_SUPPORT_LEGACY_DRAWFILTER
+
namespace {
class TestFilter : public SkDrawFilter {
public:
DEF_TEST(DrawFilter, reporter) {
test_saverestore(reporter);
}
+
+#endif