@@ -4555,5 +4555,34 @@ TEST_P(AiksTest, GaussianBlurWithoutDecalSupport) {
45554555 ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
45564556}
45574557
4558+ // Smoketest to catch issues with the coverage hint.
4559+ // Draws a rotated blurred image within a rectangle clip. The center of the clip
4560+ // rectangle is the center of the rotated image. The entire area of the clip
4561+ // rectangle should be filled with opaque colors output by the blur.
4562+ TEST_P (AiksTest, GaussianBlurRotatedAndClipped) {
4563+ Canvas canvas;
4564+ std::shared_ptr<Texture> boston = CreateTextureForFixture (" boston.jpg" );
4565+ Rect bounds =
4566+ Rect::MakeXYWH (0 , 0 , boston->GetSize ().width , boston->GetSize ().height );
4567+ Vector2 image_center = Vector2 (bounds.GetSize () / 2 );
4568+ Paint paint = {.image_filter =
4569+ ImageFilter::MakeBlur (Sigma (20.0 ), Sigma (20.0 ),
4570+ FilterContents::BlurStyle::kNormal ,
4571+ Entity::TileMode::kDecal )};
4572+ Vector2 clip_size = {150 , 75 };
4573+ Vector2 center = Vector2 (1024 , 768 ) / 2 ;
4574+ canvas.Scale (GetContentScale ());
4575+ canvas.ClipRect (
4576+ Rect::MakeLTRB (center.x , center.y , center.x , center.y ).Expand (clip_size));
4577+ canvas.Translate ({center.x , center.y , 0 });
4578+ canvas.Scale ({0.6 , 0.6 , 1 });
4579+ canvas.Rotate (Degrees (25 ));
4580+
4581+ canvas.DrawImageRect (std::make_shared<Image>(boston), /* source=*/ bounds,
4582+ /* dest=*/ bounds.Shift (-image_center), paint);
4583+
4584+ ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
4585+ }
4586+
45584587} // namespace testing
45594588} // namespace impeller
0 commit comments