diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp b/Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp index 8e77b5b..1185fa7 100644 --- a/Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp @@ -92,13 +92,17 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src) mFakeBold = src.mFakeBold; mFakeItalic = src.mFakeItalic; m_harfbuzzFace = src.m_harfbuzzFace; + mOrientation = src.mOrientation; + mTextOrientation = src.mTextOrientation; inc_count(); trace(2); } -FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold, bool fakeItalic) - : mTypeface(tf), mTextSize(textSize), mFakeBold(fakeBold), mFakeItalic(fakeItalic) +FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold, bool fakeItalic, + FontOrientation orientation, TextOrientation textOrientation) + : mTypeface(tf), mTextSize(textSize), mFakeBold(fakeBold), mFakeItalic(fakeItalic), + mOrientation(orientation), mTextOrientation(textOrientation) { if (hashTableDeletedFontValue() != mTypeface) { SkSafeRef(mTypeface); @@ -110,7 +114,7 @@ FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize) : mTypeface(src.mTypeface), mTextSize(textSize), mFakeBold(src.mFakeBold), mFakeItalic(src.mFakeItalic), - m_harfbuzzFace(src.m_harfbuzzFace) + m_harfbuzzFace(src.m_harfbuzzFace), mOrientation(src.mOrientation), mTextOrientation(src.mTextOrientation) { if (hashTableDeletedFontValue() != mTypeface) { SkSafeRef(mTypeface); @@ -129,7 +133,8 @@ FontPlatformData::FontPlatformData(float size, bool bold, bool oblique) FontPlatformData::FontPlatformData(const FontPlatformData& src, SkTypeface* tf) : mTypeface(tf), mTextSize(src.mTextSize), mFakeBold(src.mFakeBold), - mFakeItalic(src.mFakeItalic) + mFakeItalic(src.mFakeItalic), mOrientation(src.mOrientation), + mTextOrientation(src.mTextOrientation) { if (hashTableDeletedFontValue() != mTypeface) { SkSafeRef(mTypeface); @@ -165,6 +170,8 @@ FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src) mFakeBold = src.mFakeBold; mFakeItalic = src.mFakeItalic; m_harfbuzzFace = src.m_harfbuzzFace; + mOrientation = src.mOrientation; + mTextOrientation = src.mTextOrientation; return *this; } @@ -204,7 +211,9 @@ bool FontPlatformData::operator==(const FontPlatformData& a) const return mTypeface == a.mTypeface && mTextSize == a.mTextSize && mFakeBold == a.mFakeBold && - mFakeItalic == a.mFakeItalic; + mFakeItalic == a.mFakeItalic && + mOrientation == a.mOrientation && + mTextOrientation == a.mTextOrientation; } unsigned FontPlatformData::hash() const @@ -219,7 +228,8 @@ unsigned FontPlatformData::hash() const uint32_t sizeAsInt = *reinterpret_cast<const uint32_t*>(&mTextSize); - h ^= 0x01010101 * (((int)mFakeBold << 1) | (int)mFakeItalic); + h ^= 0x01010101 * ((static_cast<int>(mTextOrientation) << 3) | (static_cast<int>(mOrientation) << 2) | + ((int)mFakeBold << 1) | (int)mFakeItalic); h ^= sizeAsInt; return h; } |