1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 05:44:58 +00:00

LibGfx: Don't clone fonts in FontCascadeList::extend()

This was create a completely avoidable explosion of BitmapFont clones
when running on SerenityOS.
This commit is contained in:
Andreas Kling 2023-12-27 11:41:42 +01:00
parent bd9989b08a
commit a30d263522

View file

@ -21,7 +21,7 @@ void FontCascadeList::add(NonnullRefPtr<Font> font, Vector<UnicodeRange> unicode
void FontCascadeList::extend(FontCascadeList const& other)
{
for (auto const& font : other.m_fonts) {
m_fonts.append({ font.font->clone(), font.unicode_ranges });
m_fonts.append({ font.font, font.unicode_ranges });
}
}