cc: Enable switching main thread back to low latency mode
commit6d5aa6f17bea50e7a7c1821fde059193afe4f0f2
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 4 Mar 2014 21:42:17 +0000 (4 21:42 +0000)
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 4 Mar 2014 21:42:17 +0000 (4 21:42 +0000)
tree6c29c6475a928b148169175d3ebc8d89dbf0a29a
parent54722bb305f42c72e54f3beec4406c49ce2fe617
cc: Enable switching main thread back to low latency mode

Enable the algorithm for switching the main thread back from high to low
latency mode. The algorithm was implemented earlier by dominikg@ in
https://codereview.chromium.org/54913003.

I've done a few telemetry runs to measure the impact on latency and
smoothness. The following results are from Nexus 5.

Touch latency (touch_scroll_latency):
- 25% improvement in smoothness.key_silk_cases.
- 15% improvement in smoothness.top_25.
- 4% improvement in scheduler.tough_scheduler_cases[1] (21% improvement
  on tests that specifically target main thread latency).

Jank (jank_count):
- 15% regression in smoothness.key_silk_cases (discrepancy-based jank up
  5%).
- Unchanged in smoothness.top_25 (discrepancy-based jank up 10%).
- Unchanged in tough_scheduler_cases.

The jank metrics seem to be noisy, so I was not able to measure exactly
how they were affected. Potentially the impact can be mitigated by
tuning the draw duration estimates (crbug.com/243459).

TEST=tools/perf/run_benchmark --browser=android-chrome smoothness.key_silk_cases
BUG=309648

[1] https://codereview.chromium.org/167013003/ needed to get meaningful
    results.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254828 0039d316-1c4b-4281-b951-d872f2087c98
cc/scheduler/scheduler.cc
cc/scheduler/scheduler_settings.cc
cc/scheduler/scheduler_settings.h
cc/scheduler/scheduler_state_machine.cc
cc/scheduler/scheduler_state_machine.h
cc/scheduler/scheduler_unittest.cc