Changeset 247626 in webkit
- Timestamp:
- Jul 18, 2019 5:07:52 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247624 r247626 1 2019-07-18 Per Arne Vollan <pvollan@apple.com> 2 3 Prewarm font cache with more fonts 4 https://bugs.webkit.org/show_bug.cgi?id=199283 5 6 Reviewed by Myles C. Maxfield. 7 8 Initialize the list of families requiring system fallback in the prewarming information struct, since 9 this was part of the original, approved patch, and is needed for the performance improvement. 10 11 No new tests, covered by existing tests. 12 13 * platform/graphics/cocoa/FontCacheCoreText.cpp: 14 (WebCore::fontFamiliesForPrewarming): 15 (WebCore::FontCache::prewarmGlobally): 16 1 17 2019-07-18 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
r247566 r247626 1650 1650 } 1651 1651 1652 void FontCache::prewarmGlobally() 1653 { 1654 if (MemoryPressureHandler::singleton().isUnderMemoryPressure()) 1655 return; 1656 1657 Vector<String> families = std::initializer_list<String> { 1652 static Vector<String>& fontFamiliesForPrewarming() 1653 { 1654 static NeverDestroyed<Vector<String>> families = std::initializer_list<String> { 1658 1655 "Arial"_s, 1659 1656 "Helvetica"_s, … … 1663 1660 "Times New Roman"_s, 1664 1661 }; 1662 return families; 1663 } 1664 1665 void FontCache::prewarmGlobally() 1666 { 1667 if (MemoryPressureHandler::singleton().isUnderMemoryPressure()) 1668 return; 1665 1669 1666 1670 FontCache::PrewarmInformation prewarmInfo; 1667 prewarmInfo.seenFamilies = WTFMove(families); 1671 prewarmInfo.seenFamilies = fontFamiliesForPrewarming(); 1672 prewarmInfo.fontNamesRequiringSystemFallback = fontFamiliesForPrewarming(); 1668 1673 FontCache::singleton().prewarm(prewarmInfo); 1669 1674 }
Note: See TracChangeset
for help on using the changeset viewer.