Bug 1919511 - Rename gfxFontGroup::BuildFontList to EnsureFontList, and defer calling it until we really need the resolved font instances. r=layout-reviewers,emilio

This is preparation for splitting out separate per-script resolved font lists in gfxFontGroup.
By itself, it should not change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D222748
This commit is contained in:
Jonathan Kew
2024-10-12 15:37:18 +00:00
parent f60983e284
commit a93a779c56
6 changed files with 92 additions and 55 deletions

View File

@@ -2385,14 +2385,7 @@ already_AddRefed<gfxTextRun> BuildTextRunsScanner::BuildTextRunForFrames(
fontInflation = nsLayoutUtils::FontSizeInflationFor(firstFrame);
fontGroup = GetInflatedFontGroupForFrame(firstFrame);
}
if (fontGroup) {
// Refresh fontgroup if necessary, before trying to build textruns.
fontGroup->CheckForUpdatedPlatformList();
} else {
DestroyUserData(userDataToDestroy);
return nullptr;
}
MOZ_ASSERT(fontGroup);
if (flags2 & nsTextFrameUtils::Flags::HasTab) {
flags |= gfx::ShapedTextFlags::TEXT_ENABLE_SPACING;