[Impeller] Add matrix backdrop filter golden. (flutter/engine#43484)

Adds an Aiks golden to demonstrate issues with using
MatrixFilterContents as a backdrop filter.
This commit is contained in:
Brandon DeRosier
2023-07-10 13:09:12 -07:00
committed by GitHub
parent d93cb5e817
commit 3537a13e39

View File

@@ -2851,5 +2851,21 @@ TEST_P(AiksTest, CanCanvasDrawPicture) {
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}
TEST_P(AiksTest, MatrixBackdropFilter) {
Canvas canvas;
canvas.SaveLayer({}, std::nullopt,
[](const FilterInput::Ref& input,
const Matrix& effect_transform, bool is_subpass) {
return FilterContents::MakeMatrixFilter(
input, Matrix::MakeTranslation(Vector2(100, 100)), {},
Matrix(), true);
});
canvas.DrawCircle(Point(100, 100), 100,
{.color = Color::Green(), .blend_mode = BlendMode::kPlus});
canvas.Restore();
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}
} // namespace testing
} // namespace impeller