[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user