Commit 4e243fc4 authored by Liquan(Max) Gu's avatar Liquan(Max) Gu Committed by Commit Bot

[FCP++] Enable FCP++ metrics via finch experiment

Create a Finch experiment to turn on FCP++ metrics.

We will monitor the heart beat metrics to guarantee that FCP++ won't
introduce regressions.

Bug: 869924
Change-Id: I68b7e446c4e49bc173dc1eccf6e88a9284f90bcd
Reviewed-on: https://chromium-review.googlesource.com/c/1336555
Commit-Queue: Liquan (Max) Gǔ <maxlg@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609039}
parent d6be1748
......@@ -513,6 +513,10 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
base::FeatureList::IsEnabled(blink::features::kJankTracking) ||
enableExperimentalWebPlatformFeatures);
WebRuntimeFeatures::EnableFirstContentfulPaintPlusPlus(
base::FeatureList::IsEnabled(
blink::features::kFirstContentfulPaintPlusPlus));
WebRuntimeFeatures::EnableNoHoverDuringScroll(
base::FeatureList::IsEnabled(features::kNoHoverDuringScroll));
}
......
......@@ -2025,6 +2025,32 @@
]
}
],
"FirstContentfulPaintPlusPlus": [
{
"platforms": [
"android",
"chromeos",
"linux",
"mac",
"windows",
"ios"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"FirstContentfulPaintPlusPlus"
]
},
{
"name": "Disabled",
"disable_features": [
"FirstContentfulPaintPlusPlus"
]
}
]
}
],
"FrameTypePriorityExperiment": [
{
"platforms": [
......
......@@ -24,6 +24,10 @@ const base::Feature kEnableGpuRasterizationViewportRestriction{
"EnableGpuRasterizationViewportRestriction",
base::FEATURE_ENABLED_BY_DEFAULT};
// Enable FCP++ by experiment. See https://crbug.com/869924
const base::Feature kFirstContentfulPaintPlusPlus{
"FirstContentfulPaintPlusPlus", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable LayoutNG.
const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -16,6 +16,7 @@ BLINK_COMMON_EXPORT extern const base::Feature
kEagerCacheStorageSetupForServiceWorkers;
BLINK_COMMON_EXPORT extern const base::Feature
kEnableGpuRasterizationViewportRestriction;
BLINK_COMMON_EXPORT extern const base::Feature kFirstContentfulPaintPlusPlus;
BLINK_COMMON_EXPORT extern const base::Feature kLayoutNG;
BLINK_COMMON_EXPORT extern const base::Feature kMojoBlobURLs;
BLINK_COMMON_EXPORT extern const base::Feature kOnionSoupDOMStorage;
......
......@@ -100,6 +100,7 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableDisplayCutoutAPI(bool);
BLINK_PLATFORM_EXPORT static void EnableFastMobileScrolling(bool);
BLINK_PLATFORM_EXPORT static void EnableFileSystem(bool);
BLINK_PLATFORM_EXPORT static void EnableFirstContentfulPaintPlusPlus(bool);
BLINK_PLATFORM_EXPORT static void EnableForceTallerSelectPopup(bool);
BLINK_PLATFORM_EXPORT static void EnableGamepadExtensions(bool);
BLINK_PLATFORM_EXPORT static void EnableGamepadVibration(bool);
......
......@@ -282,9 +282,8 @@ void ImagePaintTimingDetector::ReportSwapTime(
base::TimeTicks timestamp) {
// The callback is safe from race-condition only when running on main-thread.
DCHECK(ThreadState::Current()->IsMainThread());
// This callback is queued only when there are records in
// records_pending_timing_.
DCHECK_GT(records_pending_timing_.size(), 0UL);
// Not guranteed to be non-empty, because record can be removed before the
// callback.
while (records_pending_timing_.size() > 0) {
DOMNodeId node_id = records_pending_timing_.front();
if (!id_record_map_.Contains(node_id)) {
......
......@@ -160,6 +160,10 @@ void WebRuntimeFeatures::EnableFileSystem(bool enable) {
RuntimeEnabledFeatures::SetFileSystemEnabled(enable);
}
void WebRuntimeFeatures::EnableFirstContentfulPaintPlusPlus(bool enable) {
RuntimeEnabledFeatures::SetFirstContentfulPaintPlusPlusEnabled(enable);
}
void WebRuntimeFeatures::EnableForceTallerSelectPopup(bool enable) {
RuntimeEnabledFeatures::SetForceTallerSelectPopupEnabled(enable);
}
......
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