scheduler: Detect load RAIL mode
This patch implements detection for the loading RAIL mode. This mode
starts when the top-level frame navigates and lasts until we see the
first meaningful paint for the top-level frame (which is currently not
guaranteed to happen on all pages).
We don't currently use this state for scheduling but only pass the
information to v8 which can use it to adjust garbage collection
policies.
As a safeguard against cases where FMP is not detected, we terminate the
load stage if we see user input. The assumption is that if the user is interacting
with the page, there is likely meaningful content on the screen at that point.
BUG=
613520
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed:
https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc
Cr-Commit-Position: refs/heads/master@{#435616}