aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageFilterTest.cpp
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2017-10-17 22:27:23 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-17 22:27:33 +0000
commit59f8f154872a66433eb1dfccd3d56b540193089e (patch)
tree1ef4d5d539ae27efe7157ad279f75ed86506accb /tests/ImageFilterTest.cpp
parent209c8139818ef62a60c14912c01e66d2fe7893f2 (diff)
Revert "Use combined three pass code for image blur."
This reverts commit d4a0fc7383546d106db2216515b3753937398ece. Reason for revert: Too naive about bounds Original change's description: > Use combined three pass code for image blur. > > This changes more closely matches the GL output, and the runtimes are similar or > faster for the common cases. > > x86_64 times: > benchmark old-Us new-Us old/new > blur_image_filter_large_80.00_80.00 4842.04 2626.10 1.84381 > blur_image_filter_small_80.00_80.00 3297.72 854.97 3.85712 > blur_image_filter_large_10.00_10.00 930.44 720.50 1.29138 > blur_image_filter_small_10.00_10.00 69.96 42.15 1.65979 > blur_image_filter_large_1.00_1.00 682.66 521.78 1.30833 > blur_image_filter_small_1.00_1.00 19.21 14.43 1.33125 > blur_image_filter_large_0.50_0.50 696.17 64.14 10.8539 > blur_image_filter_small_0.50_0.50 16.26 5.02 3.23904 > > arm64 times: > benchmark old-Us new-Us old/new > blur_image_filter_large_80.00_80.00 42144.53 14128.42 2.98296 > blur_image_filter_small_80.00_80.00 24840.58 4392.58 5.65512 > blur_image_filter_large_10.00_10.00 3556.40 3793.70 0.937449 > blur_image_filter_small_10.00_10.00 282.53 220.62 1.28062 > blur_image_filter_large_1.00_1.00 2502.20 2937.99 0.851671 > blur_image_filter_small_1.00_1.00 83.32 81.93 1.01697 > blur_image_filter_large_0.50_0.50 5643.80 272.83 20.6861 > blur_image_filter_small_0.50_0.50 141.02 38.29 3.68295 > > Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD > Change-Id: Ic53b3186607d5485477b92e4ca7b092bf1366c52 > Reviewed-on: https://skia-review.googlesource.com/52771 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,herb@google.com,senorblanco@chromium.org Change-Id: Idf679a8fc6d777625ad9527b843aa1614d878cba No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Reviewed-on: https://skia-review.googlesource.com/60900 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'tests/ImageFilterTest.cpp')
-rw-r--r--tests/ImageFilterTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 0b8d0d0fec..ac847ce7cf 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -855,7 +855,7 @@ DEF_TEST(ImageFilterBlurThenShadowBounds, reporter) {
sk_sp<SkImageFilter> filter2(make_drop_shadow(std::move(filter1)));
SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
- SkIRect expectedBounds = SkIRect::MakeXYWH(-132, -132, 234, 234);
+ SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236);
bounds = filter2->filterBounds(bounds, SkMatrix::I());
REPORTER_ASSERT(reporter, bounds == expectedBounds);
@@ -866,7 +866,7 @@ DEF_TEST(ImageFilterShadowThenBlurBounds, reporter) {
sk_sp<SkImageFilter> filter2(make_blur(std::move(filter1)));
SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100);
- SkIRect expectedBounds = SkIRect::MakeXYWH(-132, -132, 234, 234);
+ SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236);
bounds = filter2->filterBounds(bounds, SkMatrix::I());
REPORTER_ASSERT(reporter, bounds == expectedBounds);
@@ -895,7 +895,7 @@ DEF_TEST(ImageFilterScaledBlurRadius, reporter) {
scaleMatrix.setScale(2, 2);
SkIRect bounds = SkIRect::MakeLTRB(0, 0, 200, 200);
- SkIRect expectedBlurBounds = SkIRect::MakeLTRB(-5, -5, 205, 205);
+ SkIRect expectedBlurBounds = SkIRect::MakeLTRB(-6, -6, 206, 206);
SkIRect blurBounds = blur->filterBounds(
bounds, scaleMatrix, SkImageFilter::kForward_MapDirection);
REPORTER_ASSERT(reporter, blurBounds == expectedBlurBounds);
@@ -920,7 +920,7 @@ DEF_TEST(ImageFilterScaledBlurRadius, reporter) {
scaleMatrix.setScale(1, -1);
SkIRect bounds = SkIRect::MakeLTRB(0, -100, 100, 0);
- SkIRect expectedBlurBounds = SkIRect::MakeLTRB(-2, -102, 102, 2);
+ SkIRect expectedBlurBounds = SkIRect::MakeLTRB(-3, -103, 103, 3);
SkIRect blurBounds = blur->filterBounds(
bounds, scaleMatrix, SkImageFilter::kForward_MapDirection);
REPORTER_ASSERT(reporter, blurBounds == expectedBlurBounds);
@@ -949,7 +949,7 @@ DEF_TEST(ImageFilterComposedBlurFastBounds, reporter) {
SkRect boundsSrc = SkRect::MakeWH(SkIntToScalar(100), SkIntToScalar(100));
SkRect expectedBounds = SkRect::MakeXYWH(
- SkIntToScalar(-4), SkIntToScalar(-4), SkIntToScalar(108), SkIntToScalar(108));
+ SkIntToScalar(-6), SkIntToScalar(-6), SkIntToScalar(112), SkIntToScalar(112));
SkRect boundsDst = composedFilter->computeFastBounds(boundsSrc);
REPORTER_ASSERT(reporter, boundsDst == expectedBounds);