Commit ddc847f8 authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Cleanup trace events from fallback font on Windows

Remove code that was used to debug font fallback.

Change-Id: I65c04b1dd7167b5b2a9204bb7f2d7a7d70773cfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2470460Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817088}
parent 9e94105a
......@@ -72,7 +72,6 @@ void AppendFont(const std::string& name, int size, std::vector<Font>* fonts) {
void QueryLinkedFontsFromRegistry(const Font& font,
std::map<std::string, std::string>* font_map,
std::vector<Font>* linked_fonts) {
std::string logging_str;
const wchar_t* kSystemLink =
L"Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink";
......@@ -87,18 +86,12 @@ void QueryLinkedFontsFromRegistry(const Font& font,
return;
}
base::StringAppendF(&logging_str, "Original font: %s\n",
font.GetFontName().c_str());
std::string filename;
std::string font_name;
for (size_t i = 0; i < values.size(); ++i) {
internal::ParseFontLinkEntry(
base::WideToUTF8(values[i]), &filename, &font_name);
base::StringAppendF(&logging_str, "fallback: '%s' '%s'\n",
font_name.c_str(), filename.c_str());
// If the font name is present, add that directly, otherwise add the
// font names corresponding to the filename.
if (!font_name.empty()) {
......@@ -112,13 +105,6 @@ void QueryLinkedFontsFromRegistry(const Font& font,
}
key.Close();
for (const auto& resolved_font : *linked_fonts) {
base::StringAppendF(&logging_str, "resolved: '%s'\n",
resolved_font.GetFontName().c_str());
}
TRACE_EVENT1("fonts", "QueryLinkedFontsFromRegistry", "results", logging_str);
}
// CachedFontLinkSettings is a singleton cache of the Windows font settings
......@@ -163,9 +149,6 @@ const std::vector<Font>* CachedFontLinkSettings::GetLinkedFonts(
if (it != cached_linked_fonts_.end())
return &it->second;
TRACE_EVENT1("fonts", "CachedFontLinkSettings::GetLinkedFonts", "font_name",
font_name);
SCOPED_UMA_HISTOGRAM_LONG_TIMER(
"FontFallback.GetLinkedFonts.CacheMissTiming");
std::vector<Font>* linked_fonts = &cached_linked_fonts_[font_name];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment