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

Unified Diff: tests/ImageFilterTest.cpp

Issue 304743003: Fix filter bounds computation for SkOffsetImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Cleanup Created 6 years, 7 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
« no previous file with comments | « src/effects/SkOffsetImageFilter.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 613ec302c91f96e422b8e19e2bcc473e88fe7a10..48e86ddbb0b1eb271e64db7aca651241392617b7 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -298,9 +298,12 @@ DEF_TEST(ImageFilterDrawTiled, reporter) {
};
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 @@ DEF_TEST(ImageFilterDrawTiled, reporter) {
{ "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;
« no previous file with comments | « src/effects/SkOffsetImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698