diff --git a/engine/src/flutter/impeller/display_list/aiks_dl_blur_unittests.cc b/engine/src/flutter/impeller/display_list/aiks_dl_blur_unittests.cc index a8bffae708..94fd0471fc 100644 --- a/engine/src/flutter/impeller/display_list/aiks_dl_blur_unittests.cc +++ b/engine/src/flutter/impeller/display_list/aiks_dl_blur_unittests.cc @@ -291,6 +291,7 @@ static sk_sp MaskBlurVariantTest( builder.Scale(test_context.GetContentScale().x, test_context.GetContentScale().y); builder.Scale(0.8f, 0.8f); + builder.Translate(50.f, 50.f); DlPaint draw_paint; draw_paint.setColor( diff --git a/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc b/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc index c8fda3376c..7c2dbc316a 100644 --- a/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc +++ b/engine/src/flutter/impeller/entity/contents/filters/gaussian_blur_filter_contents.cc @@ -565,28 +565,26 @@ Entity ApplyBlurStyle(FilterContents::BlurStyle blur_style, Entity::FromSnapshot(input_snapshot, entity.GetBlendMode()); Entity result; Matrix blurred_transform = blur_entity.GetTransform(); - Matrix snapshot_transform = - entity.GetTransform() * snapshot_entity.GetTransform(); + Matrix snapshot_transform = entity.GetTransform() * // + Matrix::MakeScale(1.f / source_space_scalar) * + input_snapshot.transform; result.SetContents(Contents::MakeAnonymous( - fml::MakeCopyable( - [blur_entity = blur_entity.Clone(), blurred_transform, - source_space_scalar, snapshot_transform, - snapshot_entity = std::move(snapshot_entity)]( - const ContentContext& renderer, const Entity& entity, - RenderPass& pass) mutable { - bool result = true; - snapshot_entity.SetTransform( - entity.GetTransform() * - Matrix::MakeScale(1.f / source_space_scalar) * - snapshot_transform); - snapshot_entity.SetClipDepth(entity.GetClipDepth()); - result = result && snapshot_entity.Render(renderer, pass); - blur_entity.SetClipDepth(entity.GetClipDepth()); - blur_entity.SetTransform(entity.GetTransform() * - blurred_transform); - result = result && blur_entity.Render(renderer, pass); - return result; - }), + fml::MakeCopyable([blur_entity = blur_entity.Clone(), + blurred_transform, snapshot_transform, + snapshot_entity = std::move(snapshot_entity)]( + const ContentContext& renderer, + const Entity& entity, + RenderPass& pass) mutable { + bool result = true; + snapshot_entity.SetTransform(entity.GetTransform() * + snapshot_transform); + snapshot_entity.SetClipDepth(entity.GetClipDepth()); + result = result && snapshot_entity.Render(renderer, pass); + blur_entity.SetClipDepth(entity.GetClipDepth()); + blur_entity.SetTransform(entity.GetTransform() * blurred_transform); + result = result && blur_entity.Render(renderer, pass); + return result; + }), fml::MakeCopyable([blur_entity = blur_entity.Clone(), blurred_transform](const Entity& entity) mutable { blur_entity.SetTransform(entity.GetTransform() * blurred_transform);