WebKit Bugzilla
Attachment 349537 Details for
Bug 189541
: Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (Move FontDescriptionKey::computeHash into the corresponding implementation file + ALWAYS_INLINE tag)
0001-bug-189541.patch (text/plain), 3.67 KB, created by
Frédéric Wang (:fredw)
on 2018-09-12 03:09:22 PDT
(
hide
)
Description:
Patch (Move FontDescriptionKey::computeHash into the corresponding implementation file + ALWAYS_INLINE tag)
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-12 03:09:22 PDT
Size:
3.67 KB
patch
obsolete
>From 6e79d8204f62c74ced58b58581b8ce09e8f30a6b Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Wed, 12 Sep 2018 12:05:48 +0200 >Subject: [PATCH xserver] bug 189541 > >--- > Source/WebCore/ChangeLog | 19 +++++++++++++++++++ > .../WebCore/platform/graphics/FontCache.cpp | 17 +++++++++++++++++ > Source/WebCore/platform/graphics/FontCache.h | 17 +---------------- > 3 files changed, 37 insertions(+), 16 deletions(-) > >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e3cf292aeb8..1082bc5a364 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-09-12 Frederic Wang <fwang@igalia.com> >+ >+ Move FontDescriptionKey::computeHash into the corresponding implementation file >+ https://bugs.webkit.org/show_bug.cgi?id=185087 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ FontDescriptionKey::computeHash requires implicit instantiation of the FontTaggedSettings template. Since the >+ function is implemented directly in the header, this instantiation may happen before FontTaggedSettings::hash() is >+ actually specialized in FontFeatureSettings.cpp or FontVariationSettings.cpp. To avoid compiler errors, the >+ implementation is moved into FontCache.cpp ; while still marking the function as ALWAYS_INLINE. >+ >+ No new tests, behavior unchanged. >+ >+ * platform/graphics/FontCache.cpp: >+ (WebCore::FontDescriptionKey::computeHash const): >+ * platform/graphics/FontCache.h: >+ (WebCore::FontDescriptionKey::computeHash const): Deleted. >+ > 2018-09-11 Frederic Wang <fwang@igalia.com> > > Refactor filter list checking code >diff --git a/Source/WebCore/platform/graphics/FontCache.cpp b/Source/WebCore/platform/graphics/FontCache.cpp >index 58773be73c2..a7b1da7b701 100644 >--- a/Source/WebCore/platform/graphics/FontCache.cpp >+++ b/Source/WebCore/platform/graphics/FontCache.cpp >@@ -488,4 +488,21 @@ RefPtr<Font> FontCache::similarFont(const FontDescription&, const AtomicString&) > } > #endif > >+ALWAYS_INLINE unsigned FontDescriptionKey::computeHash() const >+{ >+ IntegerHasher hasher; >+ hasher.add(m_size); >+ hasher.add(m_fontSelectionRequest.weight); >+ hasher.add(m_fontSelectionRequest.width); >+ hasher.add(m_fontSelectionRequest.slope.value_or(normalItalicValue())); >+ hasher.add(m_locale.existingHash()); >+ for (unsigned flagItem : m_flags) >+ hasher.add(flagItem); >+ hasher.add(m_featureSettings.hash()); >+#if ENABLE(VARIATION_FONTS) >+ hasher.add(m_variationSettings.hash()); >+#endif >+ return hasher.hash(); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/FontCache.h b/Source/WebCore/platform/graphics/FontCache.h >index 8564db9c1e0..c354a901167 100644 >--- a/Source/WebCore/platform/graphics/FontCache.h >+++ b/Source/WebCore/platform/graphics/FontCache.h >@@ -104,22 +104,7 @@ struct FontDescriptionKey { > > bool isHashTableDeletedValue() const { return m_size == cHashTableDeletedSize; } > >- inline unsigned computeHash() const >- { >- IntegerHasher hasher; >- hasher.add(m_size); >- hasher.add(m_fontSelectionRequest.weight); >- hasher.add(m_fontSelectionRequest.width); >- hasher.add(m_fontSelectionRequest.slope.value_or(normalItalicValue())); >- hasher.add(m_locale.existingHash()); >- for (unsigned flagItem : m_flags) >- hasher.add(flagItem); >- hasher.add(m_featureSettings.hash()); >-#if ENABLE(VARIATION_FONTS) >- hasher.add(m_variationSettings.hash()); >-#endif >- return hasher.hash(); >- } >+ unsigned computeHash() const; > > private: > static std::array<unsigned, 2> makeFlagsKey(const FontDescription& description) >-- >2.18.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189541
: 349537 |
349566
|
349651
|
349755
|
349758