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

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

Issue 2692803005: Avoid checking family name in getLastResortFallbackFont() on Windows (Closed)
Patch Set: Created 3 years, 10 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/FontCache.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.h b/third_party/WebKit/Source/platform/fonts/FontCache.h
index 0935f294343f706945740de90f55e7c98796b509..80e95b06f6184c692fceea655abb369cb6dc397b 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.h
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.h
@@ -69,6 +69,7 @@ class SimpleFontData;
enum ShouldRetain { Retain, DoNotRetain };
enum PurgeSeverity { PurgeIfNeeded, ForcePurge };
+enum class AlternateFontName { AllowAlternate, NoAlternate, LastResort };
class PLATFORM_EXPORT FontCache {
friend class FontCachePurgePreventer;
@@ -92,10 +93,11 @@ class PLATFORM_EXPORT FontCache {
// Also implemented by the platform.
void platformInit();
- PassRefPtr<SimpleFontData> getFontData(const FontDescription&,
- const AtomicString&,
- bool checkingAlternateName = false,
- ShouldRetain = Retain);
+ PassRefPtr<SimpleFontData> getFontData(
+ const FontDescription&,
+ const AtomicString&,
+ AlternateFontName = AlternateFontName::AllowAlternate,
+ ShouldRetain = Retain);
PassRefPtr<SimpleFontData> getLastResortFallbackFont(const FontDescription&,
ShouldRetain = Retain);
SimpleFontData* getNonRetainedLastResortFallbackFont(const FontDescription&);
@@ -209,9 +211,10 @@ class PLATFORM_EXPORT FontCache {
}
// FIXME: This method should eventually be removed.
- FontPlatformData* getFontPlatformData(const FontDescription&,
- const FontFaceCreationParams&,
- bool checkingAlternateName = false);
+ FontPlatformData* getFontPlatformData(
+ const FontDescription&,
+ const FontFaceCreationParams&,
+ AlternateFontName = AlternateFontName::AllowAlternate);
#if !OS(MACOSX)
FontPlatformData* systemFontPlatformData(const FontDescription&);
#endif
@@ -220,7 +223,8 @@ class PLATFORM_EXPORT FontCache {
std::unique_ptr<FontPlatformData> createFontPlatformData(
const FontDescription&,
const FontFaceCreationParams&,
- float fontSize);
+ float fontSize,
+ AlternateFontName = AlternateFontName::AllowAlternate);
std::unique_ptr<FontPlatformData> scaleFontPlatformData(
const FontPlatformData&,
const FontDescription&,
« no previous file with comments | « third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp ('k') | third_party/WebKit/Source/platform/fonts/FontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698