Commit be159234 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

Cleanup feature to control the priority of the video capture service.

The Beta experiment shows that using USER_BLOCKING priority does not
negatively affect performance. In Slow Reports traces, we observed
that using BEST_EFFORT priority caused jank. Also, BEST_EFFORT is
not an appropriate priority to perform work that is visible to
the user. Therefore, this CL permanently changes the priority of
the video capture service to USER_BLOCKING. See
go/videocaptureservice-finch-june2020

Bug: 1066137
Change-Id: Iff96490fb90278159a7086fea7ec1523a9f78848
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2276237
Auto-Submit: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Robert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785371}
parent a411b1f4
......@@ -33,17 +33,6 @@
namespace video_capture {
namespace {
// Used to assess the impact of running the video capture service at background
// priority. If the experiment confirms that running the video capture service
// at background priority causes jank, change the code to use a foreground
// priority by default. See https://crbug.com/1066137.
const base::Feature kForegroundVideoCaptureService{
"ForegroundVideoCaptureService", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace
// Intended usage of this class is to instantiate on any sequence, and then
// operate and release the instance on the task runner exposed via
// GetTaskRunner() via WeakPtrs provided via GetWeakPtr(). To this end,
......@@ -52,13 +41,8 @@ const base::Feature kForegroundVideoCaptureService{
class VideoCaptureServiceImpl::GpuDependenciesContext {
public:
GpuDependenciesContext() {
const base::TaskPriority priority =
base::FeatureList::IsEnabled(kForegroundVideoCaptureService)
? base::TaskPriority::USER_BLOCKING
: base::TaskPriority::BEST_EFFORT;
gpu_io_task_runner_ = base::ThreadPool::CreateSequencedTaskRunner(
{priority, base::MayBlock()});
{base::TaskPriority::USER_BLOCKING, base::MayBlock()});
}
~GpuDependenciesContext() {
......
......@@ -2789,28 +2789,6 @@
]
}
],
"ForegroundVideoCaptureService": [
{
"platforms": [
"android",
"android_weblayer",
"android_webview",
"chromeos",
"ios",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"ForegroundVideoCaptureService"
]
}
]
}
],
"FormControlsRefresh": [
{
"platforms": [
......
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