Changeset 178522 in webkit


Ignore:
Timestamp:
Jan 15, 2015 12:07:47 PM (9 years ago)
Author:
Antti Koivisto
Message:

REGRESSION(r178133): Membuster regressed ~4%
https://bugs.webkit.org/show_bug.cgi?id=140495

Reviewed by Andreas Kling.

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::purgeInactiveFontData):

Fonts may ref other fonts. Keep clearing until there are no changes.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r178521 r178522  
     12015-01-15  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION(r178133): Membuster regressed ~4%
     4        https://bugs.webkit.org/show_bug.cgi?id=140495
     5
     6        Reviewed by Andreas Kling.
     7
     8        * platform/graphics/FontCache.cpp:
     9        (WebCore::FontCache::purgeInactiveFontData):
     10
     11            Fonts may ref other fonts. Keep clearing until there are no changes.
     12
    1132015-01-15  Brent Fulgham  <bfulgham@apple.com>
    214
  • trunk/Source/WebCore/platform/graphics/FontCache.cpp

    r178510 r178522  
    433433#endif
    434434
    435     Vector<RefPtr<SimpleFontData>, 20> fontsToDelete;
    436     for (auto& font : cachedFonts().values()) {
    437         if (!font->hasOneRef())
    438             continue;
    439         fontsToDelete.append(WTF::move(font));
    440         if (!--purgeCount)
     435    while (purgeCount) {
     436        Vector<RefPtr<SimpleFontData>, 20> fontsToDelete;
     437        for (auto& font : cachedFonts().values()) {
     438            if (!font->hasOneRef())
     439                continue;
     440            fontsToDelete.append(WTF::move(font));
     441            if (!--purgeCount)
     442                break;
     443        }
     444        // Fonts may ref other fonts so we loop until there are no changes.
     445        if (fontsToDelete.isEmpty())
    441446            break;
    442     }
    443     for (auto& font : fontsToDelete)
    444         cachedFonts().remove(font->platformData());
     447        for (auto& font : fontsToDelete)
     448            cachedFonts().remove(font->platformData());
     449    };
    445450
    446451    Vector<FontPlatformDataCacheKey> keysToRemove;
Note: See TracChangeset for help on using the changeset viewer.