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

Unified Diff: Source/platform/fonts/FontPlatformData.cpp

Issue 617103003: Replace ENABLE_OPENTYPE_VERTICAL implementation with HarfBuzz (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@removeOpenTypeVertical
Patch Set: Adding a Mac rebaseline Created 6 years, 1 month 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/platform/fonts/FontPlatformData.cpp
diff --git a/Source/platform/fonts/FontPlatformData.cpp b/Source/platform/fonts/FontPlatformData.cpp
index a0ed977a8bd3e11937690c902fce6564059576bf..cf5d796a7cb9f1e70b8dcd7732113d2c81bd616f 100644
--- a/Source/platform/fonts/FontPlatformData.cpp
+++ b/Source/platform/fonts/FontPlatformData.cpp
@@ -329,10 +329,9 @@ HarfBuzzFace* FontPlatformData::harfBuzzFace() const
return m_harfBuzzFace.get();
}
-#if !OS(MACOSX)
unsigned FontPlatformData::hash() const
{
- unsigned h = SkTypeface::UniqueID(m_typeface.get());
+ unsigned h = SkTypeface::UniqueID(typeface());
h ^= 0x01010101 * ((static_cast<int>(m_isHashTableDeletedValue) << 3) | (static_cast<int>(m_orientation) << 2) | (static_cast<int>(m_syntheticBold) << 1) | static_cast<int>(m_syntheticItalic));
// This memcpy is to avoid a reinterpret_cast that breaks strict-aliasing
@@ -345,6 +344,7 @@ unsigned FontPlatformData::hash() const
return h;
}
+#if !OS(MACOSX)
bool FontPlatformData::fontContainsCharacter(UChar32 character)
{
SkPaint paint;
@@ -358,7 +358,6 @@ bool FontPlatformData::fontContainsCharacter(UChar32 character)
#endif
-#if ENABLE(OPENTYPE_VERTICAL)
PassRefPtr<OpenTypeVerticalData> FontPlatformData::verticalData() const
{
return FontCache::fontCache()->getVerticalData(typeface()->uniqueID(), *this);
@@ -377,6 +376,5 @@ PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const
}
return buffer.release();
}
-#endif
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698