Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 40434c5

Browse files
committed
[Impeller] Add golden for clipped+transformed blur.
1 parent 7eb6b7c commit 40434c5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

impeller/aiks/aiks_unittests.cc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4368,5 +4368,28 @@ TEST_P(AiksTest, GaussianBlurAtPeripheryHorizontal) {
43684368
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
43694369
}
43704370

4371+
TEST_P(AiksTest, GaussianBlurRotatedAndClipped) {
4372+
// Smoketest to catch issues with the coverage hint.
4373+
Paint paint = {.image_filter =
4374+
ImageFilter::MakeBlur(Sigma(20.0), Sigma(20.0),
4375+
FilterContents::BlurStyle::kNormal,
4376+
Entity::TileMode::kDecal)};
4377+
Canvas canvas;
4378+
canvas.Scale(GetContentScale());
4379+
4380+
canvas.ClipRect(Rect::MakeLTRB(100, 200, 450, 350));
4381+
4382+
canvas.Scale(Vector2(0.5, 0.5));
4383+
canvas.Translate(Vector2(300, 100));
4384+
canvas.Rotate(Degrees(25));
4385+
4386+
std::shared_ptr<Texture> boston = CreateTextureForFixture("boston.jpg");
4387+
auto bounds =
4388+
Rect::MakeXYWH(0, 0, boston->GetSize().width, boston->GetSize().height);
4389+
canvas.DrawImageRect(std::make_shared<Image>(boston), bounds, bounds, paint);
4390+
4391+
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
4392+
}
4393+
43714394
} // namespace testing
43724395
} // namespace impeller

0 commit comments

Comments
 (0)