aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageFilterTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ImageFilterTest.cpp')
-rw-r--r--tests/ImageFilterTest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 99b5a72866..4165f2f750 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -67,7 +67,7 @@ public:
return SkColorFilterImageFilter::Create(filter, input);
}
- static SkImageFilter* make_grayscale(SkImageFilter* input = NULL, const SkIRect* cropRect = NULL) {
+ static SkImageFilter* make_grayscale(SkImageFilter* input = NULL, const SkImageFilter::CropRect* cropRect = NULL) {
SkScalar matrix[20];
memset(matrix, 0, 20 * sizeof(SkScalar));
matrix[0] = matrix[5] = matrix[10] = SkFloatToScalar(0.2126f);
@@ -109,7 +109,11 @@ public:
{
// Check that a color filter image filter with a crop rect cannot
// be expressed as a color filter.
+#ifdef SK_CROP_RECT_IS_INT
SkIRect cropRect = SkIRect::MakeXYWH(0, 0, 100, 100);
+#else
+ SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(0, 0, 100, 100));
+#endif
SkAutoTUnref<SkImageFilter> grayWithCrop(make_grayscale(NULL, &cropRect));
REPORTER_ASSERT(reporter, false == grayWithCrop->asColorFilter(NULL));
}