@@ -227,7 +227,7 @@ Entity ApplyClippedBlurStyle(Entity::ClipOperation clip_operation,
227227 clipper.SetNewClipDepth (entity.GetNewClipDepth ());
228228 clipper.SetTransform (entity.GetTransform () * entity_transform);
229229 result = clipper.Render (renderer, pass) && result;
230- blur_entity.SetClipDepth (clipper. GetClipDepth ());
230+ blur_entity.SetNewClipDepth (entity. GetNewClipDepth ());
231231 blur_entity.SetTransform (entity.GetTransform () * blur_transform);
232232 result = blur_entity.Render (renderer, pass) && result;
233233 if constexpr (!ContentContext::kEnableStencilThenCover ) {
@@ -265,34 +265,32 @@ Entity ApplyBlurStyle(FilterContents::BlurStyle blur_style,
265265 input, input_snapshot,
266266 std::move (blur_entity), geometry);
267267 case FilterContents::BlurStyle::kSolid : {
268- Entity blurred = ApplyClippedBlurStyle (Entity::ClipOperation::kDifference ,
269- entity, input, input_snapshot,
270- std::move (blur_entity), geometry);
271268 Entity snapshot_entity = Entity::FromSnapshot (
272269 input_snapshot, entity.GetBlendMode (), entity.GetClipDepth ());
273270 Entity result;
274- Matrix blurred_transform = blurred .GetTransform ();
271+ Matrix blurred_transform = blur_entity .GetTransform ();
275272 Matrix snapshot_transform = snapshot_entity.GetTransform ();
276273 result.SetContents (Contents::MakeAnonymous (
277- fml::MakeCopyable (
278- [blurred = blurred.Clone (), blurred_transform, snapshot_transform,
279- snapshot_entity = std::move (snapshot_entity)](
280- const ContentContext& renderer, const Entity& entity,
281- RenderPass& pass) mutable {
282- bool result = true ;
283- snapshot_entity.SetTransform (entity.GetTransform () *
284- snapshot_transform);
285- snapshot_entity.SetNewClipDepth (entity.GetNewClipDepth ());
286- result = result && snapshot_entity.Render (renderer, pass);
287- blurred.SetClipDepth (snapshot_entity.GetClipDepth ());
288- blurred.SetTransform (entity.GetTransform () * blurred_transform);
289- result = result && blurred.Render (renderer, pass);
290- return result;
291- }),
292- fml::MakeCopyable ([blurred = blurred.Clone (),
274+ fml::MakeCopyable ([blur_entity = blur_entity.Clone (),
275+ blurred_transform, snapshot_transform,
276+ snapshot_entity = std::move (snapshot_entity)](
277+ const ContentContext& renderer,
278+ const Entity& entity,
279+ RenderPass& pass) mutable {
280+ bool result = true ;
281+ blur_entity.SetNewClipDepth (entity.GetNewClipDepth ());
282+ blur_entity.SetTransform (entity.GetTransform () * blurred_transform);
283+ result = result && blur_entity.Render (renderer, pass);
284+ snapshot_entity.SetTransform (entity.GetTransform () *
285+ snapshot_transform);
286+ snapshot_entity.SetNewClipDepth (entity.GetNewClipDepth ());
287+ result = result && snapshot_entity.Render (renderer, pass);
288+ return result;
289+ }),
290+ fml::MakeCopyable ([blur_entity = blur_entity.Clone (),
293291 blurred_transform](const Entity& entity) mutable {
294- blurred .SetTransform (entity.GetTransform () * blurred_transform);
295- return blurred .GetCoverage ();
292+ blur_entity .SetTransform (entity.GetTransform () * blurred_transform);
293+ return blur_entity .GetCoverage ();
296294 })));
297295 return result;
298296 }
0 commit comments