Bug 1929360 - Reserve capacity before bulk append in CreateObserversForAnimatedGlyphs r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D228084
This commit is contained in:
@@ -939,6 +939,8 @@ static void CreateObserversForAnimatedGlyphs(gfxTextRun* aTextRun) {
|
||||
|
||||
aTextRun->SetFlagBits(nsTextFrameUtils::Flags::MightHaveGlyphChanges);
|
||||
|
||||
observers->SetCapacity(observers->Length() +
|
||||
fontsWithAnimatedGlyphs.Length());
|
||||
for (auto font : fontsWithAnimatedGlyphs) {
|
||||
observers->AppendElement(MakeUnique<GlyphObserver>(font, aTextRun));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user