Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Unified Diff: tests/ImageFilterTest.cpp

Issue 1823573003: Change signatures of filter bounds methods to return a rect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Hide legacy API behind #ifdef; switch callers to new API Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« include/core/SkImageFilter.h ('K') | « src/gpu/GrLayerHoister.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index b9b0028f2d731c4bf7377e283a91740d42facd87..fd916cfeb3b9d494d7121cac63aad317ae31bb01 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -756,7 +756,7 @@ DEF_TEST(ImageFilterBlurThenShadowBounds, reporter) {
SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236);
- filter2->filterBounds(bounds, SkMatrix::I(), &bounds);
+ bounds = filter2->filterBounds(bounds, SkMatrix::I());
REPORTER_ASSERT(reporter, bounds == expectedBounds);
}
@@ -767,7 +767,7 @@ DEF_TEST(ImageFilterShadowThenBlurBounds, reporter) {
SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236);
- filter2->filterBounds(bounds, SkMatrix::I(), &bounds);
+ bounds = filter2->filterBounds(bounds, SkMatrix::I());
REPORTER_ASSERT(reporter, bounds == expectedBounds);
}
@@ -778,7 +778,7 @@ DEF_TEST(ImageFilterDilateThenBlurBounds, reporter) {
SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
SkIRect expectedBounds = SkIRect::MakeXYWH(-132, -132, 234, 234);
- filter2->filterBounds(bounds, SkMatrix::I(), &bounds);
+ bounds = filter2->filterBounds(bounds, SkMatrix::I());
REPORTER_ASSERT(reporter, bounds == expectedBounds);
}
@@ -791,8 +791,7 @@ DEF_TEST(ImageFilterComposedBlurFastBounds, reporter) {
SkRect boundsSrc = SkRect::MakeWH(SkIntToScalar(100), SkIntToScalar(100));
SkRect expectedBounds = SkRect::MakeXYWH(
SkIntToScalar(-6), SkIntToScalar(-6), SkIntToScalar(112), SkIntToScalar(112));
- SkRect boundsDst = SkRect::MakeEmpty();
- composedFilter->computeFastBounds(boundsSrc, &boundsDst);
+ SkRect boundsDst = composedFilter->computeFastBounds(boundsSrc);
REPORTER_ASSERT(reporter, boundsDst == expectedBounds);
}
@@ -806,7 +805,7 @@ DEF_TEST(ImageFilterUnionBounds, reporter) {
nullptr, offset.get(), nullptr));
SkRect bounds = SkRect::MakeWH(100, 100);
// Intentionally aliasing here, as that's what the real callers do.
- composite->computeFastBounds(bounds, &bounds);
+ bounds = composite->computeFastBounds(bounds);
REPORTER_ASSERT(reporter, bounds == SkRect::MakeWH(150, 100));
}
{
@@ -814,7 +813,7 @@ DEF_TEST(ImageFilterUnionBounds, reporter) {
nullptr, nullptr, offset.get()));
SkRect bounds = SkRect::MakeWH(100, 100);
// Intentionally aliasing here, as that's what the real callers do.
- composite->computeFastBounds(bounds, &bounds);
+ bounds = composite->computeFastBounds(bounds);
REPORTER_ASSERT(reporter, bounds == SkRect::MakeWH(150, 100));
}
}
« include/core/SkImageFilter.h ('K') | « src/gpu/GrLayerHoister.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698