From 5113cf4282eaaf7bd03c5fa60925271cf2a0a9d4 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Thu, 18 Jan 2024 09:43:01 -0800 Subject: [PATCH] [Impeller] Eliminate some shared_ptr copying from EntityPass::Render (flutter/engine#49855) Every drop counts right? --- engine/src/flutter/impeller/entity/entity_pass.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/impeller/entity/entity_pass.cc b/engine/src/flutter/impeller/entity/entity_pass.cc index bff88bb587..213b0af28e 100644 --- a/engine/src/flutter/impeller/entity/entity_pass.cc +++ b/engine/src/flutter/impeller/entity/entity_pass.cc @@ -333,8 +333,8 @@ bool EntityPass::Render(ContentContext& renderer, Rect::MakeSize(root_render_target.GetRenderTargetSize()), {.readonly = true}); - IterateAllEntities([lazy_glyph_atlas = - renderer.GetLazyGlyphAtlas()](const Entity& entity) { + const auto& lazy_glyph_atlas = renderer.GetLazyGlyphAtlas(); + IterateAllEntities([&lazy_glyph_atlas](const Entity& entity) { if (const auto& contents = entity.GetContents()) { contents->PopulateGlyphAtlas(lazy_glyph_atlas, entity.DeriveTextScale()); }