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

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

Issue 697473005: Pass indication of locally created typeface to SkCreateTypefaceFromCTFont (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/platform/fonts/FontPlatformData.h ('k') | Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontPlatformData.cpp
diff --git a/Source/platform/fonts/FontPlatformData.cpp b/Source/platform/fonts/FontPlatformData.cpp
index ceeb1b959afb42a1efaf0eba864421ee03fb422e..9144dc00d987ac8d223435b691bc16867abb2013 100644
--- a/Source/platform/fonts/FontPlatformData.cpp
+++ b/Source/platform/fonts/FontPlatformData.cpp
@@ -53,6 +53,7 @@ FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType)
, m_widthVariant(RegularWidth)
#if OS(MACOSX)
, m_font(nullptr)
+ , m_localFont(false)
#else
, m_style(FontRenderStyle())
#endif
@@ -82,6 +83,7 @@ FontPlatformData::FontPlatformData()
, m_widthVariant(RegularWidth)
#if OS(MACOSX)
, m_font(nullptr)
+ , m_localFont(false)
#else
, m_style(FontRenderStyle())
#endif
@@ -111,6 +113,7 @@ FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheti
, m_widthVariant(widthVariant)
#if OS(MACOSX)
, m_font(nullptr)
+ , m_localFont(false)
#else
, m_style(FontRenderStyle())
#endif
@@ -189,7 +192,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
}
#if OS(MACOSX)
-FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticItalic, FontOrientation orientation, FontWidthVariant widthVariant)
+FontPlatformData::FontPlatformData(CGFontRef cgFont, bool localFont, float size, bool syntheticBold, bool syntheticItalic, FontOrientation orientation, FontWidthVariant widthVariant)
: m_typeface(nullptr)
, m_family(CString())
, m_textSize(size)
@@ -201,6 +204,7 @@ FontPlatformData::FontPlatformData(CGFontRef cgFont, float size, bool syntheticB
, m_widthVariant(widthVariant)
, m_font(nullptr)
, m_cgFont(cgFont)
+ , m_localFont(localFont)
, m_isHashTableDeletedValue(false)
{
}
@@ -304,6 +308,7 @@ bool FontPlatformData::operator==(const FontPlatformData& a) const
#else
&& m_isColorBitmapFont == a.m_isColorBitmapFont
&& m_isCompositeFontReference == a.m_isCompositeFontReference
+ && m_localFont == a.m_localFont
#endif
&& m_widthVariant == a.m_widthVariant;
}
@@ -334,7 +339,7 @@ SkTypeface* FontPlatformData::typeface() const
{
#if OS(MACOSX)
if (!m_typeface)
- m_typeface = adoptRef(SkCreateTypefaceFromCTFont(ctFont()));
+ m_typeface = adoptRef(SkCreateTypefaceFromCTFont(ctFont(), m_localFont));
#endif
return m_typeface.get();
}
« no previous file with comments | « Source/platform/fonts/FontPlatformData.h ('k') | Source/platform/fonts/mac/FontCustomPlatformDataMac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698