Commit e60457d8 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Enable FontPreloadingDelaysRendering by default on trunk

According to the finch results on M83 Stable and the discussion, all
launch blockers of this feature have been cleared.

This patch first enables it on trunk. A followup internal CL will enable
it in other channels via finch configurations.

Bug: 1040632
Change-Id: Icd9ab4a85c9d755072310c1be4fc4e524133d6f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2296280Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789825}
parent 976fcd7d
...@@ -2790,29 +2790,6 @@ ...@@ -2790,29 +2790,6 @@
] ]
} }
], ],
"FontPreloadingDelaysRendering": [
{
"platforms": [
"android",
"android_webview",
"chromeos",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "EnabledWithDelay150ms",
"params": {
"delay-in-ms": "150"
},
"enable_features": [
"FontPreloadingDelaysRendering"
]
}
]
}
],
"FontSrcLocalMatching": [ "FontSrcLocalMatching": [
{ {
"platforms": [ "platforms": [
......
...@@ -558,13 +558,10 @@ const base::Feature kLinkDisabledNewSpecBehavior{ ...@@ -558,13 +558,10 @@ const base::Feature kLinkDisabledNewSpecBehavior{
// they don't miss the first paint if they can be loaded fast enough (e.g., // they don't miss the first paint if they can be loaded fast enough (e.g.,
// from the disk cache) // from the disk cache)
const base::Feature kFontPreloadingDelaysRendering{ const base::Feature kFontPreloadingDelaysRendering{
"FontPreloadingDelaysRendering", base::FEATURE_DISABLED_BY_DEFAULT}; "FontPreloadingDelaysRendering", base::FEATURE_ENABLED_BY_DEFAULT};
// 50ms is the overall best performing value in our experiments.
// Set to be over 90th-percentile of HttpCache.AccessToDone.Used on all
// platforms, and also to allow some time for IPC and scheduling.
// TODO(xiaochengh): Tune it for the best performance.
const base::FeatureParam<int> kFontPreloadingDelaysRenderingParam{ const base::FeatureParam<int> kFontPreloadingDelaysRenderingParam{
&kFontPreloadingDelaysRendering, "delay-in-ms", 100}; &kFontPreloadingDelaysRendering, "delay-in-ms", 50};
const base::Feature kFlexGaps{"FlexGaps", base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kFlexGaps{"FlexGaps", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kFlexNG{"FlexNG", base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kFlexNG{"FlexNG", base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -111,6 +111,7 @@ TEST_F(FontUpdateInvalidationTest, ...@@ -111,6 +111,7 @@ TEST_F(FontUpdateInvalidationTest,
// First render the page with the custom font // First render the page with the custom font
font_resource.Complete(ReadAhemWoff2()); font_resource.Complete(ReadAhemWoff2());
test::RunPendingTasks();
Compositor().BeginFrame(); Compositor().BeginFrame();
Element* target = GetDocument().getElementById("target"); Element* target = GetDocument().getElementById("target");
...@@ -208,6 +209,7 @@ TEST_F(FontUpdateInvalidationTest, FallbackBetweenPendingAndLoadedCustomFonts) { ...@@ -208,6 +209,7 @@ TEST_F(FontUpdateInvalidationTest, FallbackBetweenPendingAndLoadedCustomFonts) {
)HTML"); )HTML");
fast_font_resource.Complete(ReadAhemWoff2()); fast_font_resource.Complete(ReadAhemWoff2());
test::RunPendingTasks();
// While slow-font is pending and fast-font is already available, we should // While slow-font is pending and fast-font is already available, we should
// use it to render the page. // use it to render the page.
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<td></td> <td></td>
<td class="arial">a</td> <td class="arial">a</td>
<td></td> <td></td>
<td></td> <td class="arial">a</td>
</tr> </tr>
<tr> <tr>
<td>1</td> <td>1</td>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<meta name="timeout" content="long"> <meta name="timeout" content="long">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-display-desc"> <link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-display-desc">
<link rel="match" href="font-display-ref.html"> <link rel="match" href="font-display-ref.html">
<link rel="preload" href="/fonts/Ahem.ttf?pipe=trickle(d0)" as="font" crossorigin>
<style> <style>
.hidden { display: none; } .hidden { display: none; }
</style> </style>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<td></td> <td></td>
<td class="arial">a</td> <td class="arial">a</td>
<td></td> <td></td>
<td></td> <td class="arial">a</td>
</tr> </tr>
<tr> <tr>
<td>1</td> <td>1</td>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<style> <style>
.hidden { display: none; } .hidden { display: none; }
</style> </style>
<link rel="preload" href="/resources/Ahem.ttf" as="font" crossorigin>
<p>Tests how text with a font that takes <i>delay</i> seconds to load look like after <i>T</i> seconds from load start.</p> <p>Tests how text with a font that takes <i>delay</i> seconds to load look like after <i>T</i> seconds from load start.</p>
<table id="container"> <table id="container">
<tr> <tr>
......
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