Skip to content

Commit

Permalink
Apply kCompositing thread type to Media thread on Fuchsia.
Browse files Browse the repository at this point in the history
Improve media performance on heavily loaded Fuchsia devices by applying
kCompositing thread type to the Media thread. The exact parameters of
this thread type are customized per-product using Fuchsia's scheduler
role mechanism.

In the long term, we would like to align on new thread types and
priorities for the media thread and related pool threads, suggested in
https://crrev.com/c/chromium/src/+/3920078/comment/545232d3_7203c331/

However, we have a release blocking performance bug that is confirmed to
be addressed by this minimal, Fuchsia-only change. Landing this in the
interim unblocks the release and buys time to align on the longer term
solution.

(cherry picked from commit 4dc925d)

Bug: 1174339
Bug: b/242564647
Change-Id: I1ad68f83c84e645386dd154c3d2f7f3e03ba1c7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4103643
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Corey Tabaka <eieio@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1082773}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4104857
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Srinivas Sista <srinivassista@chromium.org>
Owners-Override: Srinivas Sista <srinivassista@chromium.org>
Cr-Commit-Position: refs/branch-heads/5359@{#1202}
Cr-Branched-From: 27d3765-refs/heads/main@{#1058933}
  • Loading branch information
Corey Tabaka authored and Chromium LUCI CQ committed Dec 14, 2022
1 parent 471b0c9 commit 5067a2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/renderer/render_thread_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,9 @@ RenderThreadImpl::GetMediaThreadTaskRunner() {
#if BUILDFLAG(IS_FUCHSIA)
// Start IO thread on Fuchsia to make that thread usable for FIDL.
base::Thread::Options options(base::MessagePumpType::IO, 0);
// TODO(crbug.com/1400772): Use kCompositing to address media latency on
// Fuchsia until alignment on new media thread types is achieved.
options.thread_type = base::ThreadType::kCompositing;
#else
base::Thread::Options options;
#endif
Expand Down

0 comments on commit 5067a2a

Please sign in to comment.