Title: [190232] trunk/Source/WebCore
- Revision
- 190232
- Author
- [email protected]
- Date
- 2015-09-24 18:50:04 -0700 (Thu, 24 Sep 2015)
Log Message
Unreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression.
<rdar://problem/22657123>
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontCascade.cpp:
(WebCore::operator==):
(WebCore::makeFontSelectorFlags):
(WebCore::makeFontCascadeCacheKey):
(WebCore::computeFontCascadeCacheHash):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (190231 => 190232)
--- trunk/Source/WebCore/ChangeLog 2015-09-25 00:54:24 UTC (rev 190231)
+++ trunk/Source/WebCore/ChangeLog 2015-09-25 01:50:04 UTC (rev 190232)
@@ -1,3 +1,16 @@
+2015-09-24 Chris Dumez <[email protected]>
+
+ Unreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression.
+ <rdar://problem/22657123>
+
+ * platform/graphics/FontCache.h:
+ (WebCore::FontDescriptionKey::makeFlagsKey):
+ * platform/graphics/FontCascade.cpp:
+ (WebCore::operator==):
+ (WebCore::makeFontSelectorFlags):
+ (WebCore::makeFontCascadeCacheKey):
+ (WebCore::computeFontCascadeCacheHash):
+
2015-09-24 David Hyatt <[email protected]>
Keep the already-parsed list of terms in custom property values so that we don't have to re-parse them
Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (190231 => 190232)
--- trunk/Source/WebCore/platform/graphics/FontCache.h 2015-09-25 00:54:24 UTC (rev 190231)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h 2015-09-25 01:50:04 UTC (rev 190232)
@@ -112,10 +112,7 @@
static std::array<unsigned, 2> makeFlagsKey(const FontDescription& description)
{
static_assert(USCRIPT_CODE_LIMIT < 0x1000, "Script code must fit in an unsigned along with the other flags");
- unsigned first = static_cast<unsigned>(description.script()) << 11
- | static_cast<unsigned>(description.textRenderingMode()) << 9
- | static_cast<unsigned>(description.smallCaps()) << 8
- | static_cast<unsigned>(description.fontSynthesis()) << 6
+ unsigned first = static_cast<unsigned>(description.textRenderingMode()) << 6
| static_cast<unsigned>(description.widthVariant()) << 4
| static_cast<unsigned>(description.nonCJKGlyphOrientation()) << 3
| static_cast<unsigned>(description.orientation()) << 2
Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (190231 => 190232)
--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp 2015-09-25 00:54:24 UTC (rev 190231)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp 2015-09-25 01:50:04 UTC (rev 190232)
@@ -183,6 +183,7 @@
Vector<AtomicString, 3> families;
unsigned fontSelectorId;
unsigned fontSelectorVersion;
+ unsigned fontSelectorFlags;
};
struct FontCascadeCacheEntry {
@@ -202,7 +203,7 @@
{
if (a.fontDescriptionKey != b.fontDescriptionKey)
return false;
- if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion)
+ if (a.fontSelectorId != b.fontSelectorId || a.fontSelectorVersion != b.fontSelectorVersion|| a.fontSelectorFlags != b.fontSelectorFlags)
return false;
if (a.families.size() != b.families.size())
return false;
@@ -230,6 +231,11 @@
value->fonts.get().widthCache().clear();
}
+static unsigned makeFontSelectorFlags(const FontDescription& description)
+{
+ return static_cast<unsigned>(description.script()) << 1 | static_cast<unsigned>(description.smallCaps());
+}
+
static FontCascadeCacheKey makeFontCascadeCacheKey(const FontCascadeDescription& description, FontSelector* fontSelector)
{
FontCascadeCacheKey key;
@@ -238,6 +244,7 @@
key.families.append(description.familyAt(i));
key.fontSelectorId = fontSelector ? fontSelector->uniqueId() : 0;
key.fontSelectorVersion = fontSelector ? fontSelector->version() : 0;
+ key.fontSelectorFlags = fontSelector && fontSelector->resolvesFamilyFor(description) ? makeFontSelectorFlags(description) : 0;
return key;
}
@@ -250,6 +257,7 @@
hashCodes.uncheckedAppend(key.fontDescriptionKey.computeHash());
hashCodes.uncheckedAppend(key.fontSelectorId);
hashCodes.uncheckedAppend(key.fontSelectorVersion);
+ hashCodes.uncheckedAppend(key.fontSelectorFlags);
for (unsigned i = 0; i < key.families.size(); ++i)
hashCodes.uncheckedAppend(key.families[i].impl() ? CaseFoldingHash::hash(key.families[i]) : 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes