From 913c239c4cc35bcff8de7d2b141f39ce13342a36 Mon Sep 17 00:00:00 2001 From: Michael Ludwig Date: Fri, 4 Nov 2022 15:24:03 -0400 Subject: [PATCH 1/2] Update display_list_image_filter_unittests to be permit Skia roll https://skia-review.googlesource.com/c/skia/+/571798 had to be reverted because it causes DisplayListImageFilter.LocalImageFilterBounds to fail. With SkMatrixTransformImageFilter (returned by SkImageFilters::MatrixTransform) supporting complex matrices, makeWithLocalMatrix(rotation) will no longer return null. This is at odds with the behavior of DlImageFilter's implementation which tries to mimic the existing behavior of image filters. This relaxes the test case so that Skia can improve its implementation without breaking Flutter's tests. Flutter can then update DlImageFilter to match out-of-band. --- display_list/display_list_image_filter_unittests.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/display_list/display_list_image_filter_unittests.cc b/display_list/display_list_image_filter_unittests.cc index 0edddecffda40..06e62b764dcea 100644 --- a/display_list/display_list_image_filter_unittests.cc +++ b/display_list/display_list_image_filter_unittests.cc @@ -810,8 +810,9 @@ TEST(DisplayListImageFilter, LocalImageFilterBounds) { auto sk_local_filter = sk_filters[i]->makeWithLocalMatrix(m); auto dl_local_filter = dl_filters[i]->makeWithLocalMatrix(m); if (!sk_local_filter || !dl_local_filter) { - ASSERT_TRUE(!sk_local_filter); - ASSERT_TRUE(!dl_local_filter); + // Allow the SkImageFilter to support at least, but possibly more, + // matrices than DlImageFilter. + ASSERT_TRUE(sk_local_filter || !dl_local_filter); continue; } { From eed6a7370c0898bd59e9e87f60e2d493d644f7cb Mon Sep 17 00:00:00 2001 From: Michael Ludwig Date: Mon, 7 Nov 2022 10:26:57 -0500 Subject: [PATCH 2/2] Update comment to reference flutter issue. --- display_list/display_list_image_filter_unittests.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/display_list/display_list_image_filter_unittests.cc b/display_list/display_list_image_filter_unittests.cc index 06e62b764dcea..c447d52e81586 100644 --- a/display_list/display_list_image_filter_unittests.cc +++ b/display_list/display_list_image_filter_unittests.cc @@ -810,8 +810,10 @@ TEST(DisplayListImageFilter, LocalImageFilterBounds) { auto sk_local_filter = sk_filters[i]->makeWithLocalMatrix(m); auto dl_local_filter = dl_filters[i]->makeWithLocalMatrix(m); if (!sk_local_filter || !dl_local_filter) { - // Allow the SkImageFilter to support at least, but possibly more, - // matrices than DlImageFilter. + // Temporarily relax the equivalence testing to allow Skia to expand + // their behavior. Once the Skia fixes are rolled in, the + // DlImageFilter should adapt to the new rules. + // See https://github.com/flutter/flutter/issues/114723 ASSERT_TRUE(sk_local_filter || !dl_local_filter); continue; }