Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1646)

Unified Diff: Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp

Issue 24874002: Have all skia platforms share FontPlatformData::hash() implementation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
diff --git a/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp b/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
index e86b3416a043de5dbefdbfdffac218352d9d6eb2..8bca56d200efac9cd5368121579712af127eadbe 100644
--- a/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
+++ b/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
@@ -240,21 +240,6 @@ bool FontPlatformData::operator==(const FontPlatformData& a) const
&& m_isHashTableDeletedValue == a.m_isHashTableDeletedValue;
}
-unsigned FontPlatformData::hash() const
-{
- unsigned h = SkTypeface::UniqueID(m_typeface.get());
- h ^= 0x01010101 * ((static_cast<int>(m_orientation) << 2) | (static_cast<int>(m_fakeBold) << 1) | static_cast<int>(m_fakeItalic));
-
- // This memcpy is to avoid a reinterpret_cast that breaks strict-aliasing
- // rules. Memcpy is generally optimized enough so that performance doesn't
- // matter here.
- uint32_t textSizeBytes;
- memcpy(&textSizeBytes, &m_textSize, sizeof(uint32_t));
- h ^= textSizeBytes;
-
- return h;
-}
-
bool FontPlatformData::isFixedPitch() const
{
notImplemented();

Powered by Google App Engine
This is Rietveld 408576698