Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Issue 23796002: cc: Implement deadine scheduling disabled by default (Closed)

Created:
7 years, 3 months ago by brianderson
Modified:
7 years, 2 months ago
CC:
chromium-reviews, jbauman+watch_chromium.org, nkostylev+watch_chromium.org, yusukes+watch_chromium.org, piman, jam, penghuang+watch_chromium.org, apatrick_chromium, sievers+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, Ian Vollick, oshima+watch_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, James Su, stevenjb+watch_chromium.org, danakj+watch_chromium.org, davemoore+watch_chromium.org, miu+watch_chromium.org, nduca, boliu, joth, jdduke (slow), epenner, klobag.chromium, reveman, vmpstr, sadrul
Base URL:
http://git.chromium.org/chromium/src.git@schedReadback4
Visibility:
Public.

Description

cc: Implement deadine scheduling disabled by default This patch adds logic to the Scheduler to actually use the BeginFrame and deadline, but is not enabled by default on any platform yet. This will ensure emulation of old scheduler in the fallback path is sane. Emulation of the old path is implemented using an immediate 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. (True on Android. Soon to be true on other platforms.) - 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 compositors can be nested 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. BUG=243461

Patch Set 1 #

Total comments: 9

Patch Set 2 : fix tests; fix early dealine after activation #

Patch Set 3 : fix typos #

Patch Set 4 : remove output_surface_lost flag #

Patch Set 5 : rebase #

Patch Set 6 : rebase #

Patch Set 7 : rebase again #

Patch Set 8 : rebase? #

Total comments: 14

Patch Set 9 : rebase #

Patch Set 10 : Fix LayerTreeHostDamageTestVisibleTilesStillTriggerDraws #

Patch Set 11 : Address enne's comments #

Patch Set 12 : rebase #

Patch Set 13 : git cl format #

Patch Set 14 : Fix context lost race conditions #

Total comments: 11

Patch Set 15 : rebase on removal of safe_to_expect_begin_frame workaround #

Patch Set 16 : rebase on pending commits; use current_frame_number_ again #

Patch Set 17 : address enne's comments #

Total comments: 6

Patch Set 18 : remove unnecessary DCHECK #

Patch Set 19 : rebase and address enne's comments #

Patch Set 20 : Rebase on epenner's ManageTiles patch #

Total comments: 9

Patch Set 21 : rebase; remove redundant call to UpdateBackgroundAnimateTicking #

Patch Set 22 : Enable by default on Aura #

Total comments: 1

Patch Set 23 : disable by default everywhere #

Total comments: 28

Patch Set 24 : address dana's commetns #

Total comments: 1

Patch Set 25 : tentative: do not tie commit to BeginImplFrame #

Patch Set 26 : tie commit to BeginImplFrame again #

Patch Set 27 : disable racey tests #

Patch Set 28 : disable OverscrollNavigation too #

Patch Set 29 : Fix animations, but still sample timestamp in BeginFrame. #

Total comments: 3

Patch Set 30 : Only tie commit to BEGIN_FRAME_IDLE when deadline enabled #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1261 lines, -588 lines) Patch
cc/output/begin_frame_args.h View 1 chunk +1 line, -3 lines 0 comments Download
cc/output/begin_frame_args.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +7 lines, -4 lines 0 comments Download
cc/output/output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +5 lines, -5 lines 0 comments Download
cc/output/output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +12 lines, -11 lines 0 comments Download
cc/output/output_surface_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 7 chunks +36 lines, -19 lines 0 comments Download
cc/scheduler/frame_rate_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +6 lines, -7 lines 0 comments Download
cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +8 lines, -0 lines 0 comments Download
cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 9 chunks +90 lines, -29 lines 0 comments Download
cc/scheduler/scheduler_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
cc/scheduler/scheduler_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +41 lines, -15 lines 0 comments Download
cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 20 chunks +136 lines, -40 lines 0 comments Download
cc/scheduler/scheduler_state_machine_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 55 chunks +548 lines, -352 lines 0 comments Download
cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 chunks +322 lines, -72 lines 0 comments Download
cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -2 lines 0 comments Download
cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +9 lines, -9 lines 0 comments Download
cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -0 lines 0 comments Download
cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -0 lines 0 comments Download
cc/trees/thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -0 lines 0 comments Download
cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 8 chunks +29 lines, -19 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
brianderson
This depends on https://codereview.chromium.org/23503003/. I have not fixed any tests yet, but it works in ...
7 years, 3 months ago (2013-08-30 00:12:28 UTC) #1
Sami
Great to see this happening :) https://codereview.chromium.org/23796002/diff/1/cc/base/switches.cc File cc/base/switches.cc (right): https://codereview.chromium.org/23796002/diff/1/cc/base/switches.cc#newcode31 cc/base/switches.cc:31: // Overrides the ...
7 years, 3 months ago (2013-08-30 13:49:06 UTC) #2
brianderson
https://codereview.chromium.org/23796002/diff/1/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23796002/diff/1/cc/scheduler/scheduler_state_machine.cc#newcode845 cc/scheduler/scheduler_state_machine.cc:845: // TODO(brianderson): This should take into account multiple commit ...
7 years, 3 months ago (2013-09-03 22:51:46 UTC) #3
brianderson
Tests have been fixed and Sami's comments addressed. ptal.
7 years, 3 months ago (2013-09-06 03:28:42 UTC) #4
enne (OOO)
https://codereview.chromium.org/23796002/diff/27001/cc/base/switches.cc File cc/base/switches.cc (right): https://codereview.chromium.org/23796002/diff/27001/cc/base/switches.cc#newcode31 cc/base/switches.cc:31: // Overrides the kDisableDeadlineScheduling flag. typo? s/Disable/Enable/ https://codereview.chromium.org/23796002/diff/27001/cc/scheduler/scheduler.cc File ...
7 years, 3 months ago (2013-09-10 03:35:43 UTC) #5
brianderson
https://codereview.chromium.org/23796002/diff/27001/cc/base/switches.cc File cc/base/switches.cc (right): https://codereview.chromium.org/23796002/diff/27001/cc/base/switches.cc#newcode31 cc/base/switches.cc:31: // Overrides the kDisableDeadlineScheduling flag. On 2013/09/10 03:35:44, enne ...
7 years, 3 months ago (2013-09-10 21:16:55 UTC) #6
brianderson
ptal. I have addressed enne's comments and fixed the resulting output surface initialization race conditions ...
7 years, 3 months ago (2013-09-11 01:44:23 UTC) #7
brianderson
There was one last race condition that was resulting in overlapping BeginFrame+deadline intervals, which I've ...
7 years, 3 months ago (2013-09-11 19:01:39 UTC) #8
enne (OOO)
Thanks for all the changes. This CL is a lot more simple. https://codereview.chromium.org/23796002/diff/61001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc ...
7 years, 3 months ago (2013-09-11 22:30:46 UTC) #9
brianderson
https://codereview.chromium.org/23796002/diff/61001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/23796002/diff/61001/cc/scheduler/scheduler.cc#newcode207 cc/scheduler/scheduler.cc:207: PostBeginFrameDeadline(last_begin_frame_args_.frame_time + On 2013/09/11 22:30:47, enne wrote: > This ...
7 years, 3 months ago (2013-09-12 00:12:33 UTC) #10
enne (OOO)
https://codereview.chromium.org/23796002/diff/61001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/23796002/diff/61001/cc/scheduler/scheduler.cc#newcode207 cc/scheduler/scheduler.cc:207: PostBeginFrameDeadline(last_begin_frame_args_.frame_time + On 2013/09/12 00:12:34, Brian Anderson wrote: > ...
7 years, 3 months ago (2013-09-12 00:26:45 UTC) #11
brianderson
ptal. I've addressed enne's comments and rebased on top of: https://codereview.chromium.org/23767011 - cc: Always use ...
7 years, 3 months ago (2013-09-12 20:48:54 UTC) #12
enne (OOO)
https://codereview.chromium.org/23796002/diff/72001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/23796002/diff/72001/cc/scheduler/scheduler.cc#newcode144 cc/scheduler/scheduler.cc:144: // Only disable the BeginFrame after a BeginFrame where ...
7 years, 3 months ago (2013-09-12 21:56:21 UTC) #13
brianderson
https://codereview.chromium.org/23796002/diff/72001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/23796002/diff/72001/cc/scheduler/scheduler.cc#newcode144 cc/scheduler/scheduler.cc:144: // Only disable the BeginFrame after a BeginFrame where ...
7 years, 3 months ago (2013-09-12 22:42:53 UTC) #14
enne (OOO)
https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc#newcode425 cc/trees/thread_proxy.cc:425: frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); Maybe I just missed this in ...
7 years, 3 months ago (2013-09-13 22:28:50 UTC) #15
brianderson
https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc#newcode425 cc/trees/thread_proxy.cc:425: frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); On 2013/09/13 22:28:51, enne wrote: > ...
7 years, 3 months ago (2013-09-13 22:50:31 UTC) #16
brianderson
+ajuma for comment regarding the call to UpdateBackgroundAnimateTicking in ThreadProxy::ScheduledActionCommit.
7 years, 3 months ago (2013-09-13 22:52:58 UTC) #17
enne (OOO)
https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc#newcode425 cc/trees/thread_proxy.cc:425: frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); With this patch, the animation time ...
7 years, 3 months ago (2013-09-13 23:21:53 UTC) #18
brianderson
https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc#newcode425 cc/trees/thread_proxy.cc:425: frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); I think the naming of the ...
7 years, 3 months ago (2013-09-14 00:09:58 UTC) #19
ajuma
https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc#newcode425 cc/trees/thread_proxy.cc:425: frame_did_draw_ || !layer_tree_host_impl_->CanDraw()); On 2013/09/14 00:09:59, Brian Anderson wrote: ...
7 years, 3 months ago (2013-09-14 00:19:39 UTC) #20
brianderson
On 2013/09/14 00:19:39, ajuma wrote: > https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc > File cc/trees/thread_proxy.cc (right): > > https://codereview.chromium.org/23796002/diff/105001/cc/trees/thread_proxy.cc#newcode425 > ...
7 years, 3 months ago (2013-09-14 00:40:39 UTC) #21
ajuma
> @ajuma: Older versions of the patch were calling BeginFrame to background tick, > but ...
7 years, 3 months ago (2013-09-14 01:38:43 UTC) #22
ajuma
On 2013/09/14 01:38:43, ajuma wrote: > > @ajuma: Older versions of the patch were calling ...
7 years, 3 months ago (2013-09-14 01:50:12 UTC) #23
enne (OOO)
Thanks for the animation sanity check. lgtm, modulo removing that UpdateBackgroundAnimations call that sounds unnecessary.
7 years, 3 months ago (2013-09-16 17:17:08 UTC) #24
brianderson
The latest patch enables this by default for all Aura platforms as well. https://codereview.chromium.org/23796002/diff/125001/cc/base/switches.cc File ...
7 years, 3 months ago (2013-09-17 01:35:52 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/23796002/125001
7 years, 3 months ago (2013-09-17 01:46:19 UTC) #26
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=25777
7 years, 3 months ago (2013-09-17 01:59:55 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/23796002/125001
7 years, 3 months ago (2013-09-17 02:04:21 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/23796002/45001
7 years, 3 months ago (2013-09-17 03:45:47 UTC) #29
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=198217
7 years, 3 months ago (2013-09-17 05:50:09 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/23796002/45001
7 years, 3 months ago (2013-09-17 06:09:53 UTC) #31
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=155015
7 years, 3 months ago (2013-09-17 07:13:06 UTC) #32
brianderson
There was a lot of flakiness last night, so I didn't bother forcing this patch ...
7 years, 3 months ago (2013-09-17 17:13:48 UTC) #33
danakj
I made it to the end of the scheduler changes so far, these were my ...
7 years, 3 months ago (2013-09-17 20:26:17 UTC) #34
brianderson
https://codereview.chromium.org/23796002/diff/45001/cc/output/begin_frame_args.cc File cc/output/begin_frame_args.cc (right): https://codereview.chromium.org/23796002/diff/45001/cc/output/begin_frame_args.cc#newcode55 cc/output/begin_frame_args.cc:55: // and the Renderer Main thread the first 1/3 ...
7 years, 3 months ago (2013-09-17 21:08:23 UTC) #35
brianderson
https://codereview.chromium.org/23796002/diff/154001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23796002/diff/154001/cc/scheduler/scheduler_state_machine.cc#newcode456 cc/scheduler/scheduler_state_machine.cc:456: if (begin_frame_state_ == BEGIN_FRAME_STATE_IDLE && In browser tests, is ...
7 years, 3 months ago (2013-09-18 00:14:38 UTC) #36
brianderson
I talked with @sadrul offline and opened up a bug to debug the racy tests ...
7 years, 3 months ago (2013-09-18 02:04:01 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/23796002/16027
7 years, 3 months ago (2013-09-18 02:04:30 UTC) #38
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=25993
7 years, 3 months ago (2013-09-18 02:18:27 UTC) #39
brianderson
piman, I need an OWNERS review of the two tests I disabled in web_contents_view_aura_browsertest.cc. Do ...
7 years, 3 months ago (2013-09-18 02:25:37 UTC) #40
piman
Can we double-check that we're not breaking functionality here?
7 years, 3 months ago (2013-09-18 06:05:31 UTC) #41
brianderson
On 2013/09/18 06:05:31, piman wrote: > Can we double-check that we're not breaking functionality here? ...
7 years, 3 months ago (2013-09-18 20:08:50 UTC) #42
brianderson
Animations did end up having a bug. It was possible for a commit to come ...
7 years, 3 months ago (2013-09-19 00:35:32 UTC) #43
danakj
Think a cc_unittest is in order that can test this closer to the source in ...
7 years, 3 months ago (2013-09-19 00:37:18 UTC) #44
brianderson
On 2013/09/19 00:37:18, danakj wrote: > Think a cc_unittest is in order that can test ...
7 years, 3 months ago (2013-09-19 19:01:20 UTC) #45
ajuma
On 2013/09/19 19:01:20, Brian Anderson wrote: > For the layout tests, debugging and fixing those ...
7 years, 3 months ago (2013-09-19 19:13:56 UTC) #46
brianderson
https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc#newcode456 cc/scheduler/scheduler_state_machine.cc:456: if (begin_frame_state_ == BEGIN_FRAME_STATE_IDLE && This condition hurts the ...
7 years, 3 months ago (2013-09-19 19:14:22 UTC) #47
danakj
https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc#newcode456 cc/scheduler/scheduler_state_machine.cc:456: if (begin_frame_state_ == BEGIN_FRAME_STATE_IDLE && On 2013/09/19 19:14:24, Brian ...
7 years, 3 months ago (2013-09-19 19:17:41 UTC) #48
brianderson
On 2013/09/19 19:17:41, danakj wrote: > https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc > File cc/scheduler/scheduler_state_machine.cc (right): > > https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc#newcode456 > ...
7 years, 3 months ago (2013-09-19 19:57:56 UTC) #49
brianderson
https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23796002/diff/174001/cc/scheduler/scheduler_state_machine.cc#newcode456 cc/scheduler/scheduler_state_machine.cc:456: if (begin_frame_state_ == BEGIN_FRAME_STATE_IDLE && I was wondering how ...
7 years, 3 months ago (2013-09-19 21:58:24 UTC) #50
brianderson
7 years, 3 months ago (2013-09-20 00:37:46 UTC) #51
I got the base files missing error. Moving to:
https://codereview.chromium.org/24304002

Powered by Google App Engine
This is Rietveld 408576698