Commit 1687197a authored by kulshin's avatar kulshin Committed by Commit bot

Delete the font loading experiment code

This experiment has been on canary for a week, and unambiguously
demonstrates that using memory mapped files is better for font loading
perf. Using a memory mapped file improves font family load time by up
to 5-25%, and even shows a tiny improvement in overall startup time.

BUG=577387

Review URL: https://codereview.chromium.org/1920843004

Cr-Commit-Position: refs/heads/master@{#389824}
parent c9c73f48
......@@ -42,9 +42,6 @@ enum DirectWriteLoadFamilyResult {
const char kFontKeyName[] = "font_key_name";
const base::Feature kFileLoadingExperimentFeature{
"DirectWriteFontFileLoadingExperiment", base::FEATURE_DISABLED_BY_DEFAULT};
void LogLoadFamilyResult(DirectWriteLoadFamilyResult result) {
UMA_HISTOGRAM_ENUMERATION("DirectWrite.Fonts.Proxy.LoadFamilyResult", result,
LOAD_FAMILY_MAX_VALUE);
......@@ -487,16 +484,7 @@ HRESULT FontFileEnumerator::GetCurrentFontFile(IDWriteFontFile** file) {
return E_FAIL;
}
if (base::FeatureList::IsEnabled(kFileLoadingExperimentFeature)) {
TRACE_EVENT0("dwrite",
"FontFileEnumerator::GetCurrentFontFile (directwrite)");
HRESULT hr = factory_->CreateFontFileReference(
file_names_[current_file_].c_str(), nullptr /* lastWriteTime*/, file);
DCHECK(SUCCEEDED(hr));
return hr;
}
TRACE_EVENT0("dwrite", "FontFileEnumerator::GetCurrentFontFile (memmap)");
TRACE_EVENT0("dwrite", "FontFileEnumerator::GetCurrentFontFile");
// CreateCustomFontFileReference ends up calling
// DWriteFontCollectionProxy::CreateStreamFromKey.
HRESULT hr = factory_->CreateCustomFontFileReference(
......
......@@ -180,7 +180,6 @@ class CONTENT_EXPORT FontFileEnumerator
// Implements the DirectWrite font file stream interface that maps the file to
// be loaded as a memory mapped file, and subsequently returns pointers into
// the mapped memory block.
// TODO(kulshin): confirm that using custom streams is actually an improvement
class CONTENT_EXPORT FontFileStream
: public Microsoft::WRL::RuntimeClass<
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
......
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