Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions impeller/aiks/aiks_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Image>(CreateTextureForFixture("airplane.jpg"));
canvas.Translate({600, -200});
canvas.SaveLayer({
.image_filter = std::make_shared<MatrixImageFilter>(
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()));
}
Expand Down
4 changes: 2 additions & 2 deletions impeller/entity/entity_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ std::optional<Rect> 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.
Expand Down