Fix filter bounds computation for SkOffsetImageFilter.
SkOffsetImageFilter::onFilterBounds() was not recursing into its input
filter when computing bounds.
BUG=374556
R=junov@chromium.org
Review URL: https://codereview.chromium.org/304743003
git-svn-id: http://skia.googlecode.com/svn/trunk@14928 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 613ec30..48e86dd 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -298,9 +298,12 @@
};
SkISize kernelSize = SkISize::Make(3, 3);
SkScalar gain = SK_Scalar1, bias = 0;
+ SkScalar five = SkIntToScalar(5);
SkAutoTUnref<SkImageFilter> gradient_source(SkBitmapSource::Create(make_gradient_circle(64, 64)));
+ SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(five, five));
SkMatrix matrix;
+
matrix.setTranslate(SK_Scalar1, SK_Scalar1);
matrix.postRotate(SkIntToScalar(45), SK_Scalar1, SK_Scalar1);
@@ -331,6 +334,7 @@
{ "tile", SkTileImageFilter::Create(SkRect::MakeXYWH(0, 0, 50, 50),
SkRect::MakeXYWH(0, 0, 100, 100), NULL) },
{ "matrix", SkMatrixImageFilter::Create(matrix, SkPaint::kLow_FilterLevel) },
+ { "blur and offset", SkOffsetImageFilter::Create(five, five, blur.get()) },
};
SkBitmap untiledResult, tiledResult;