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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontPlatformData.h

Issue 1931393002: Introduce typeface cache in blink::FontCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip: others Created 4 years, 8 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: third_party/WebKit/Source/platform/fonts/FontPlatformData.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontPlatformData.h b/third_party/WebKit/Source/platform/fonts/FontPlatformData.h
index 4e85939729e8e1fe33da5574ad31ea7696ab5ed9..9a27e940d666c14826781443ce8d64b6832a9d55 100644
--- a/third_party/WebKit/Source/platform/fonts/FontPlatformData.h
+++ b/third_party/WebKit/Source/platform/fonts/FontPlatformData.h
@@ -79,12 +79,11 @@ public:
FontPlatformData(WTF::HashTableDeletedValueType);
FontPlatformData();
FontPlatformData(const FontPlatformData&);
- FontPlatformData(float size, bool syntheticBold, bool syntheticItalic, FontOrientation = FontOrientation::Horizontal);
- FontPlatformData(const FontPlatformData& src, float textSize);
+ FontPlatformData(bool syntheticBold, bool syntheticItalic, FontOrientation = FontOrientation::Horizontal);
#if OS(MACOSX)
FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool syntheticItalic = false, FontOrientation = FontOrientation::Horizontal);
#endif
- FontPlatformData(PassRefPtr<SkTypeface>, const char* name, float textSize, bool syntheticBold, bool syntheticItalic, FontOrientation = FontOrientation::Horizontal);
+ FontPlatformData(PassRefPtr<SkTypeface>, const char* name, bool syntheticBold, bool syntheticItalic, FontOrientation = FontOrientation::Horizontal);
~FontPlatformData();
#if OS(MACOSX)
@@ -93,13 +92,12 @@ public:
#endif
String fontFamilyName() const;
- float size() const { return m_textSize; }
bool syntheticBold() const { return m_syntheticBold; }
bool syntheticItalic() const { return m_syntheticItalic; }
SkTypeface* typeface() const;
HarfBuzzFace* harfBuzzFace() const;
- bool hasSpaceInLigaturesOrKerning(TypesettingFeatures) const;
+ bool hasSpaceInLigaturesOrKerning(float fontSize, const FontRenderStyle&, TypesettingFeatures) const;
SkFontID uniqueID() const;
unsigned hash() const;
@@ -132,30 +130,19 @@ public:
// The returned styles are all actual styles without FontRenderStyle::NoPreference.
const FontRenderStyle& getFontRenderStyle() const { return m_style; }
#endif
- void setupPaint(SkPaint*, float deviceScaleFactor = 1, const Font* = 0) const;
+ void setupPaint(SkPaint*) const;
#if OS(WIN)
int paintTextFlags() const { return m_paintTextFlags; }
-#else
- static void setHinting(SkPaint::Hinting);
- static void setAutoHint(bool);
- static void setUseBitmaps(bool);
- static void setAntiAlias(bool);
- static void setSubpixelRendering(bool);
#endif
private:
-#if !OS(MACOSX)
- void querySystemForRenderStyle();
-#endif
-
RefPtr<SkTypeface> m_typeface;
#if !OS(WIN)
CString m_family;
#endif
public:
- float m_textSize;
bool m_syntheticBold;
bool m_syntheticItalic;
FontOrientation m_orientation;

Powered by Google App Engine
This is Rietveld 408576698