diff --git a/impeller/aiks/aiks_unittests.cc b/impeller/aiks/aiks_unittests.cc index 849cf648b1f8e..a4d7cdaff2c0f 100644 --- a/impeller/aiks/aiks_unittests.cc +++ b/impeller/aiks/aiks_unittests.cc @@ -3590,6 +3590,25 @@ TEST_P(AiksTest, ClearBlend) { clear.blend_mode = BlendMode::kClear; canvas.DrawCircle(Point::MakeXY(300.0, 300.0), 200.0, clear); +} + +TEST_P(AiksTest, MatrixImageFilterMagnify) { + Canvas canvas; + canvas.Scale(GetContentScale()); + auto image = std::make_shared(CreateTextureForFixture("airplane.jpg")); + canvas.Translate({600, -200}); + canvas.SaveLayer({ + .image_filter = std::make_shared( + Matrix{ + 2, 0, 0, 0, // + 0, 2, 0, 0, // + 0, 0, 2, 0, // + 0, 0, 0, 1 // + }, + SamplerDescriptor{}), + }); + canvas.DrawImage(image, {0, 0}, Paint{.color = Color(1.0, 1.0, 1.0, 0.5)}); + canvas.Restore(); ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture())); } diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index 0d91112369ae7..bc312cd6bcb1a 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -202,8 +202,8 @@ std::optional EntityPass::GetSubpassCoverage( // has deviated too much from the parent pass to safely intersect with the // pass coverage limit. coverage_limit = - (image_filter && image_filter->IsTranslationOnly() ? std::nullopt - : coverage_limit); + (image_filter && !image_filter->IsTranslationOnly() ? std::nullopt + : coverage_limit); auto entities_coverage = subpass.GetElementsCoverage(coverage_limit); // The entities don't cover anything. There is nothing to do.