Descriptioncc: Use BeginFrameArgs
This patch adds logic to the Scheduler to actually use the BeginFrame
and deadline.
SchedulerStateMachine::begin_frame_state has been added and can be in one
of 4 states: Idle, InsideBeginFrame, DeadlinePending, or InsideDeadline.
Notable restrictions of the states are:
- We start a commit as soon after InsideBeginFrame as we can, since the
BeginFrame will be coordinated with user input.
- We do not start a commit while Idle, in order to wait for the next
batch of user input.
- Draw and swap only occurs during the InsideDeadline state.
The deadlines of the Browser and Renderer compositor can be staggered in
order to have a total draw latency of < 1 frame when starting off. If we can't
hit 1 frame of latency consistently, we will fallback to a higher latency
mode to increase throughput.
Making these changes exposed some bugs and necessitated some other changes
that are hard to commit separately. Notable changes include:
1) The Scheduler listens to the ReadyToActivate signal and makes the final
call regarding when to activate. This avoids activating commit 2 before
commit 1 has been drawn. It also helps reduce the number of calls to
ManageTiles because we don't call ActivatePendingTreeIfNeeded every frame.
2) An OutputSurfaceState to make sure we do not draw after output surface
initialization until after the first commit.
3) A ForcedRedrawOnTimeoutState that forces a draw and swap if we've skipped
too many draws because of checkerboarding. This is synchronized with the
normal display pipeline and respects the BeginFrame and deadline.
4) A SynchronousReadback state to track readback commits and their
"replacement commits" to make sure we don't draw before activation
of the readback commit and don't swap before activation of the
replacement commit. This executes as fast as possible and does not
respect the BeginFrame/deadline timing semantics. Back to back
readbacks before the replacement commit arrive are supported.
5) A number of unit test updates and fixes.
BUG=243461
BUG=269272
Patch Set 1 #
Total comments: 23
Patch Set 2 : Many optimizations. Address comments. #
Total comments: 9
Patch Set 3 : address comments #
Total comments: 4
Patch Set 4 : Tweaks; Address more comments; #
Total comments: 2
Patch Set 5 : fix some tests; needs rebase; #
Total comments: 3
Patch Set 6 : Rebase; More tests fixed; #
Total comments: 4
Patch Set 7 : Fix tests, output surface lost, and WebView #Patch Set 8 : else if typo #
Total comments: 6
Patch Set 9 : OVERRIDE fixes #Patch Set 10 : StateMachine test working; Reworked readback. #
Total comments: 1
Patch Set 11 : Fixed all existing tests! New tests pending... #
Total comments: 9
Patch Set 12 : A bit of cleanup #
Total comments: 3
Patch Set 13 : Rebase; Avoid double activate; Fix OutputSurface init and page scroll delta; #
Total comments: 14
Patch Set 14 : Fix compile error #Patch Set 15 : Fix clang compile errors #Patch Set 16 : Address comments #Patch Set 17 : Allow back2back readbacks #
Total comments: 4
Patch Set 18 : Another round of cleanup #
Total comments: 23
Patch Set 19 : More cleanup #Patch Set 20 : rebase #Patch Set 21 : Undo page scale changes, LayerFix TreeHostAnimationTestTickAnimationWhileBackgrounded #Patch Set 22 : rebase #
Total comments: 3
Patch Set 23 : Address comments #Patch Set 24 : Add missing OVERRIDE #
Total comments: 1
Patch Set 25 : rebase #Patch Set 26 : Revert TextureLayer unittest changes; Fix rare double BeginFrame after DidLoseOutputSurface #Patch Set 27 : Improve main thread perf by pushing out deadline if no Impl updates. #
Total comments: 26
Patch Set 28 : rebase #Patch Set 29 : git cl format #Patch Set 30 : Address enne's commetns #Patch Set 31 : Fix tests #
Total comments: 3
Patch Set 32 : rebase #Patch Set 33 : Add an --enable-deadline-scheduler commandline flag. #
Total comments: 4
Messages
Total messages: 89 (0 generated)
|