Changeset 190232 in webkit
- Timestamp:
- Sep 24, 2015 6:50:04 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r190231 r190232 1 2015-09-24 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression. 4 <rdar://problem/22657123> 5 6 * platform/graphics/FontCache.h: 7 (WebCore::FontDescriptionKey::makeFlagsKey): 8 * platform/graphics/FontCascade.cpp: 9 (WebCore::operator==): 10 (WebCore::makeFontSelectorFlags): 11 (WebCore::makeFontCascadeCacheKey): 12 (WebCore::computeFontCascadeCacheHash): 13 1 14 2015-09-24 David Hyatt <hyatt@apple.com> 2 15 -
trunk/Source/WebCore/platform/graphics/FontCache.h
r190192 r190232 113 113 { 114 114 static_assert(USCRIPT_CODE_LIMIT < 0x1000, "Script code must fit in an unsigned along with the other flags"); 115 unsigned first = static_cast<unsigned>(description.script()) << 11 116 | static_cast<unsigned>(description.textRenderingMode()) << 9 117 | static_cast<unsigned>(description.smallCaps()) << 8 118 | static_cast<unsigned>(description.fontSynthesis()) << 6 115 unsigned first = static_cast<unsigned>(description.textRenderingMode()) << 6 119 116 | static_cast<unsigned>(description.widthVariant()) << 4 120 117 | static_cast<unsigned>(description.nonCJKGlyphOrientation()) << 3 -
trunk/Source/WebCore/platform/graphics/FontCascade.cpp
r190192 r190232 184 184 unsigned fontSelectorId; 185 185 unsigned fontSelectorVersion; 186 unsigned fontSelectorFlags; 186 187 }; 187 188 … … 203 204 if (a.fontDescriptionKey != b.fontDescriptionKey) 204 205 return false; 205 if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion )206 if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion|| a.fontSelectorFlags != b.fontSelectorFlags) 206 207 return false; 207 208 if (a.families.size() != b.families.size()) … … 229 230 for (auto& value : fontCascadeCache().values()) 230 231 value->fonts.get().widthCache().clear(); 232 } 233 234 static unsigned makeFontSelectorFlags(const FontDescription& description) 235 { 236 return static_cast<unsigned>(description.script()) << 1 | static_cast<unsigned>(description.smallCaps()); 231 237 } 232 238 … … 239 245 key.fontSelectorId = fontSelector ? fontSelector->uniqueId() : 0; 240 246 key.fontSelectorVersion = fontSelector ? fontSelector->version() : 0; 247 key.fontSelectorFlags = fontSelector && fontSelector->resolvesFamilyFor(description) ? makeFontSelectorFlags(description) : 0; 241 248 return key; 242 249 } … … 251 258 hashCodes.uncheckedAppend(key.fontSelectorId); 252 259 hashCodes.uncheckedAppend(key.fontSelectorVersion); 260 hashCodes.uncheckedAppend(key.fontSelectorFlags); 253 261 for (unsigned i = 0; i < key.families.size(); ++i) 254 262 hashCodes.uncheckedAppend(key.families[i].impl() ? CaseFoldingHash::hash(key.families[i]) : 0);
Note: See TracChangeset
for help on using the changeset viewer.