[Impeller] Eliminate some shared_ptr copying from EntityPass::Render (flutter/engine#49855)

Every drop counts right?
This commit is contained in:
Dan Field
2024-01-18 09:43:01 -08:00
committed by GitHub
parent 0c7d05da12
commit 5113cf4282

View File

@@ -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());
}