aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar djsollen <djsollen@google.com>2014-08-25 09:06:19 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-25 09:06:19 -0700
commit38cb688bd0e17021bb140bbc15ac1a7b8f182939 (patch)
tree2c720f5b9019ee45763b53973e422bdd25f5bf89 /tests
parent28648fe4a69b0cee8df42b5966e4e645c3aabefb (diff)
Revert of Fix recursive computation of filter bounds for drop shadow, (patchset #1 of https://codereview.chromium.org/481273005/)
Reason for revert: This CL is currently breaking the Win7 and Win8 bots on some of the new tests (in DM). Original issue's description: > Fix recursive computation of filter bounds for drop shadow, > morphology, blur. > > Because we're computing "backwards" from a clip rect of destination > pixels to be filled to the required source pixels, we should use tail > recursion rather than head recursion in onFilterBounds(). > > This actually only makes a difference for drop-shadow, where > the computation is non-commutative. Blur and morphology commute, but I > moved them to tail recursion anyway for clarity (so all onFilterBounds > use tail recursion). > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/28648fe4a69b0cee8df42b5966e4e645c3aabefb R=bsalomon@google.com, senorblanco@chromium.org TBR=bsalomon@google.com, senorblanco@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: djsollen@google.com Review URL: https://codereview.chromium.org/504773003
Diffstat (limited to 'tests')
-rw-r--r--tests/ImageFilterTest.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index e7e0f84385..f87f99ce98 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -469,50 +469,6 @@ DEF_TEST(ImageFilterDrawMatrixBBH, reporter) {
}
}
-static SkImageFilter* makeBlur(SkImageFilter* input = NULL) {
- return SkBlurImageFilter::Create(SK_Scalar1, SK_Scalar1, input);
-}
-
-static SkImageFilter* makeDropShadow(SkImageFilter* input = NULL) {
- return SkDropShadowImageFilter::Create(
- SkIntToScalar(100), SkIntToScalar(100),
- SkIntToScalar(10), SkIntToScalar(10),
- SK_ColorBLUE, input);
-}
-
-DEF_TEST(ImageFilterBlurThenShadowBounds, reporter) {
- SkAutoTUnref<SkImageFilter> filter1(makeBlur());
- SkAutoTUnref<SkImageFilter> filter2(makeDropShadow(filter1.get()));
-
- SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
- SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236);
- filter2->filterBounds(bounds, SkMatrix(), &bounds);
-
- REPORTER_ASSERT(reporter, bounds == expectedBounds);
-}
-
-DEF_TEST(ImageFilterShadowThenBlurBounds, reporter) {
- SkAutoTUnref<SkImageFilter> filter1(makeDropShadow());
- SkAutoTUnref<SkImageFilter> filter2(makeBlur(filter1.get()));
-
- SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
- SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236);
- filter2->filterBounds(bounds, SkMatrix(), &bounds);
-
- REPORTER_ASSERT(reporter, bounds == expectedBounds);
-}
-
-DEF_TEST(ImageFilterDilateThenBlurBounds, reporter) {
- SkAutoTUnref<SkImageFilter> filter1(SkDilateImageFilter::Create(2, 2));
- SkAutoTUnref<SkImageFilter> filter2(makeDropShadow(filter1.get()));
-
- SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
- SkIRect expectedBounds = SkIRect::MakeXYWH(-132, -132, 234, 234);
- filter2->filterBounds(bounds, SkMatrix(), &bounds);
-
- REPORTER_ASSERT(reporter, bounds == expectedBounds);
-}
-
static void drawBlurredRect(SkCanvas* canvas) {
SkAutoTUnref<SkImageFilter> filter(SkBlurImageFilter::Create(SkIntToScalar(8), 0));
SkPaint filterPaint;