aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-10-22 13:20:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-22 13:20:20 -0700
commitc9b5f8b1522e72449d704d30ed6aee4fc6211ee8 (patch)
tree2076a03c9e01fe3146e64755f54684abd3ea9497 /tests
parent6ae30fbbafe9aa9596922ac96ecaae0278b7be65 (diff)
tunnel down texture-size-constraint to imagefilters
Diffstat (limited to 'tests')
-rw-r--r--tests/ImageFilterTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index b118296566..012b1a9862 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -319,7 +319,7 @@ static void test_crop_rects(SkImageFilter::Proxy* proxy, skiatest::Reporter* rep
SkIPoint offset;
SkString str;
str.printf("filter %d", static_cast<int>(i));
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr);
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr, SkImageFilter::kApprox_SizeConstraint);
REPORTER_ASSERT_MESSAGE(reporter, filter->filterImage(proxy, bitmap, ctx,
&result, &offset), str.c_str());
REPORTER_ASSERT_MESSAGE(reporter, offset.fX == 20 && offset.fY == 30, str.c_str());
@@ -364,12 +364,12 @@ static void test_negative_blur_sigma(SkImageFilter::Proxy* proxy, skiatest::Repo
SkBitmap positiveResult1, negativeResult1;
SkBitmap positiveResult2, negativeResult2;
SkIPoint offset;
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr);
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr, SkImageFilter::kApprox_SizeConstraint);
positiveFilter->filterImage(proxy, gradient, ctx, &positiveResult1, &offset);
negativeFilter->filterImage(proxy, gradient, ctx, &negativeResult1, &offset);
SkMatrix negativeScale;
negativeScale.setScale(-SK_Scalar1, SK_Scalar1);
- SkImageFilter::Context negativeCTX(negativeScale, SkIRect::MakeLargest(), nullptr);
+ SkImageFilter::Context negativeCTX(negativeScale, SkIRect::MakeLargest(), nullptr, SkImageFilter::kApprox_SizeConstraint);
positiveFilter->filterImage(proxy, gradient, negativeCTX, &negativeResult2, &offset);
negativeFilter->filterImage(proxy, gradient, negativeCTX, &positiveResult2, &offset);
SkAutoLockPixels lockP1(positiveResult1);
@@ -882,7 +882,7 @@ DEF_TEST(ImageFilterClippedPictureImageFilter, reporter) {
SkBitmap result;
SkIPoint offset;
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeXYWH(1, 1, 1, 1), nullptr);
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeXYWH(1, 1, 1, 1), nullptr, SkImageFilter::kApprox_SizeConstraint);
SkBitmap bitmap;
bitmap.allocN32Pixels(2, 2);
const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
@@ -1133,7 +1133,7 @@ DEF_TEST(ComposedImageFilterOffset, reporter) {
SkAutoTUnref<SkImageFilter> composedFilter(SkComposeImageFilter::Create(blurFilter, offsetFilter.get()));
SkBitmap result;
SkIPoint offset;
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr);
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr, SkImageFilter::kApprox_SizeConstraint);
REPORTER_ASSERT(reporter, composedFilter->filterImage(&proxy, bitmap, ctx, &result, &offset));
REPORTER_ASSERT(reporter, offset.fX == 1 && offset.fY == 0);
}
@@ -1151,7 +1151,7 @@ DEF_TEST(PartialCropRect, reporter) {
SkAutoTUnref<SkImageFilter> filter(make_grayscale(nullptr, &cropRect));
SkBitmap result;
SkIPoint offset;
- SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr);
+ SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeLargest(), nullptr, SkImageFilter::kApprox_SizeConstraint);
REPORTER_ASSERT(reporter, filter->filterImage(&proxy, bitmap, ctx, &result, &offset));
REPORTER_ASSERT(reporter, offset.fX == 0);
REPORTER_ASSERT(reporter, offset.fY == 0);