@@ -2174,5 +2174,52 @@ TEST_P(AiksTest, CanRenderDestructiveSaveLayer) {
21742174 ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
21752175}
21762176
2177+ TEST_P (AiksTest, CanRenderBackdropBlurInteractive) {
2178+ auto callback = [&](AiksContext& renderer, RenderTarget& render_target) {
2179+ auto [a, b] = IMPELLER_PLAYGROUND_LINE (Point (50 , 50 ), Point (300 , 200 ), 30 ,
2180+ Color::White (), Color::White ());
2181+
2182+ Canvas canvas;
2183+ canvas.DrawCircle ({100 , 100 }, 50 , {.color = Color::CornflowerBlue ()});
2184+ canvas.DrawCircle ({300 , 200 }, 100 , {.color = Color::GreenYellow ()});
2185+ canvas.DrawCircle ({140 , 170 }, 75 , {.color = Color::DarkMagenta ()});
2186+ canvas.DrawCircle ({180 , 120 }, 100 , {.color = Color::OrangeRed ()});
2187+ canvas.ClipRRect (Rect::MakeLTRB (a.x , a.y , b.x , b.y ), 20 );
2188+ canvas.SaveLayer ({.blend_mode = BlendMode::kSource }, std::nullopt ,
2189+ [](const FilterInput::Ref& input,
2190+ const Matrix& effect_transform, bool is_subpass) {
2191+ return FilterContents::MakeGaussianBlur (
2192+ input, Sigma (20.0 ), Sigma (20.0 ),
2193+ FilterContents::BlurStyle::kNormal ,
2194+ Entity::TileMode::kClamp , effect_transform);
2195+ });
2196+ canvas.Restore ();
2197+
2198+ return renderer.Render (canvas.EndRecordingAsPicture (), render_target);
2199+ };
2200+
2201+ ASSERT_TRUE (OpenPlaygroundHere (callback));
2202+ }
2203+
2204+ TEST_P (AiksTest, CanRenderBackdropBlur) {
2205+ Canvas canvas;
2206+ canvas.DrawCircle ({100 , 100 }, 50 , {.color = Color::CornflowerBlue ()});
2207+ canvas.DrawCircle ({300 , 200 }, 100 , {.color = Color::GreenYellow ()});
2208+ canvas.DrawCircle ({140 , 170 }, 75 , {.color = Color::DarkMagenta ()});
2209+ canvas.DrawCircle ({180 , 120 }, 100 , {.color = Color::OrangeRed ()});
2210+ canvas.ClipRRect (Rect::MakeLTRB (75 , 50 , 375 , 275 ), 20 );
2211+ canvas.SaveLayer ({.blend_mode = BlendMode::kSource }, std::nullopt ,
2212+ [](const FilterInput::Ref& input,
2213+ const Matrix& effect_transform, bool is_subpass) {
2214+ return FilterContents::MakeGaussianBlur (
2215+ input, Sigma (30.0 ), Sigma (30.0 ),
2216+ FilterContents::BlurStyle::kNormal ,
2217+ Entity::TileMode::kClamp , effect_transform);
2218+ });
2219+ canvas.Restore ();
2220+
2221+ ASSERT_TRUE (OpenPlaygroundHere (canvas.EndRecordingAsPicture ()));
2222+ }
2223+
21772224} // namespace testing
21782225} // namespace impeller
0 commit comments