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

Unified Diff: third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/skia/FontCacheSkia.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp b/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp
index 9cba858e6da91e7a7a506e736c3084783018e84d..59cd332406b7539fed65aba3e116a4929c30f836 100644
--- a/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp
+++ b/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp
@@ -148,21 +148,21 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescri
// We should at least have Sans or Arial which is the last resort fallback of SkFontHost ports.
if (!fontPlatformData) {
- DEFINE_STATIC_LOCAL(const FontFaceCreationParams, sansCreationParams, (AtomicString("Sans", AtomicString::ConstructFromLiteral)));
+ DEFINE_STATIC_LOCAL(const FontFaceCreationParams, sansCreationParams, (AtomicString("Sans")));
fontPlatformData = getFontPlatformData(description, sansCreationParams);
}
if (!fontPlatformData) {
- DEFINE_STATIC_LOCAL(const FontFaceCreationParams, arialCreationParams, (AtomicString("Arial", AtomicString::ConstructFromLiteral)));
+ DEFINE_STATIC_LOCAL(const FontFaceCreationParams, arialCreationParams, (AtomicString("Arial")));
fontPlatformData = getFontPlatformData(description, arialCreationParams);
}
#if OS(WIN)
// Try some more Windows-specific fallbacks.
if (!fontPlatformData) {
- DEFINE_STATIC_LOCAL(const FontFaceCreationParams, msuigothicCreationParams, (AtomicString("MS UI Gothic", AtomicString::ConstructFromLiteral)));
+ DEFINE_STATIC_LOCAL(const FontFaceCreationParams, msuigothicCreationParams, (AtomicString("MS UI Gothic")));
fontPlatformData = getFontPlatformData(description, msuigothicCreationParams);
}
if (!fontPlatformData) {
- DEFINE_STATIC_LOCAL(const FontFaceCreationParams, mssansserifCreationParams, (AtomicString("Microsoft Sans Serif", AtomicString::ConstructFromLiteral)));
+ DEFINE_STATIC_LOCAL(const FontFaceCreationParams, mssansserifCreationParams, (AtomicString("Microsoft Sans Serif")));
fontPlatformData = getFontPlatformData(description, mssansserifCreationParams);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698