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

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)

Created:
3 years, 9 months ago by Dan Elphick
Modified:
3 years, 7 months ago
CC:
brianderson, cc-bugs_chromium.org, chromium-reviews, scheduler-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create new action sent when a BeginMainFrame not expected before vsync. The renderer scheduler can then use this information to schedule short idle work as would have happened after a BeginMainFrame. This allows idle work to be scheduled for instance in cases where a compositor animation is occurring which prevents BeginMainFrameNotExpectedSoon from being sent. BUG=683962 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2753843003 Cr-Commit-Position: refs/heads/master@{#469619} Committed: https://chromium.googlesource.com/chromium/src/+/9db74aa87f97c709baf5d38b82fb987713a40951

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix funnel initial state #

Total comments: 22

Patch Set 3 : Never schedule idle work if we're already scheduling a main frame #

Total comments: 4

Patch Set 4 : Repond to review comments and make state machine tests pass. #

Patch Set 5 : Wire up the short idle work action to the renderer scheduler and actually do short idle work #

Patch Set 6 : Rename state machine action to make it consistent with other names #

Patch Set 7 : missed one #

Total comments: 14

Patch Set 8 : Add tests for scheduler and state machine #

Patch Set 9 : Add renderer scheduler test #

Patch Set 10 : Respond to Sami's comments #

Total comments: 8

Patch Set 11 : tweak scheduler to not schedule idle work after a commit. Complete renaming. #

Total comments: 9

Patch Set 12 : fix up some const refs that should be POD. Fix up state machine decision comments. add some logging. #

Total comments: 8

Patch Set 13 : respond to Brian's comments #

Total comments: 4

Patch Set 14 : fix Sami's comments #

Total comments: 6

Patch Set 15 : Add the "time" to the BeginMainFrameNotExpectedUntil trace event and fix a comment. #

Patch Set 16 : merge in latest changes #

Patch Set 17 : Add BeginMainFrameNotExpectedUntil to MockRendererScheduler. #

Patch Set 18 : Add BeginMainFrameNotExpectedUntil to content::CompositorImpl for Android. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -80 lines) Patch
M cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +6 lines, -1 line 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +60 lines, -6 lines 0 comments Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 30 chunks +81 lines, -3 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 54 chunks +144 lines, -70 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/stub_layer_tree_host_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host.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
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/proxy_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -0 lines 0 comments Download
M cc/trees/proxy_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/proxy_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/test/fake_renderer_scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/scheduler/test/fake_renderer_scheduler.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
M third_party/WebKit/public/platform/scheduler/test/mock_renderer_scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 63 (27 generated)
Sami
Seems like a good direction, although we can probably simplify the logic a bit. https://codereview.chromium.org/2753843003/diff/1/cc/scheduler/scheduler_state_machine.cc ...
3 years, 9 months ago (2017-03-15 16:33:08 UTC) #3
Dan Elphick
https://codereview.chromium.org/2753843003/diff/1/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/2753843003/diff/1/cc/scheduler/scheduler_state_machine.cc#newcode48 cc/scheduler/scheduler_state_machine.cc:48: do_idle_work_funnel_(true), On 2017/03/15 16:33:08, Sami wrote: > Maybe add ...
3 years, 9 months ago (2017-03-15 16:44:09 UTC) #4
Sami
https://codereview.chromium.org/2753843003/diff/20001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/20001/cc/scheduler/scheduler.cc#newcode634 cc/scheduler/scheduler.cc:634: BeginImplFrameNotExpectedSoon(); Let's introduce a new notification which kicks off ...
3 years, 9 months ago (2017-03-20 16:58:50 UTC) #5
Dan Elphick
https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc#newcode436 cc/scheduler/scheduler_state_machine.cc:436: if (needs_begin_main_frame_ || send_begin_main_frame_funnel_) I made this change here ...
3 years, 9 months ago (2017-03-21 11:23:51 UTC) #6
Sami
https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc#newcode436 cc/scheduler/scheduler_state_machine.cc:436: if (needs_begin_main_frame_ || send_begin_main_frame_funnel_) On 2017/03/21 11:23:51, Dan Elphick ...
3 years, 9 months ago (2017-03-21 11:35:21 UTC) #7
Sami
https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc#newcode436 cc/scheduler/scheduler_state_machine.cc:436: if (needs_begin_main_frame_ || send_begin_main_frame_funnel_) On 2017/03/21 11:35:21, Sami wrote: ...
3 years, 9 months ago (2017-03-21 11:36:39 UTC) #8
Dan Elphick
On 2017/03/21 11:36:39, Sami wrote: > https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc > File cc/scheduler/scheduler_state_machine.cc (right): > > https://codereview.chromium.org/2753843003/diff/40001/cc/scheduler/scheduler_state_machine.cc#newcode436 > ...
3 years, 9 months ago (2017-03-21 11:58:38 UTC) #9
Sami
On 2017/03/21 11:58:38, Dan Elphick wrote: > On 2017/03/21 11:36:39, Sami wrote: > > > ...
3 years, 9 months ago (2017-03-21 12:09:59 UTC) #10
Dan Elphick
On 2017/03/21 12:09:59, Sami wrote: > On 2017/03/21 11:58:38, Dan Elphick wrote: > > Perhaps ...
3 years, 9 months ago (2017-03-21 12:16:52 UTC) #11
Dan Elphick
I've started going through the test failures due to this and have resolved all of ...
3 years, 9 months ago (2017-03-21 15:56:25 UTC) #12
Sami
On 2017/03/21 15:56:25, Dan Elphick wrote: > I've started going through the test failures due ...
3 years, 9 months ago (2017-03-21 17:12:25 UTC) #13
Dan Elphick
On 2017/03/21 17:12:25, Sami wrote: > On 2017/03/21 15:56:25, Dan Elphick wrote: > > I've ...
3 years, 9 months ago (2017-03-23 17:30:49 UTC) #14
Sami
Looks great! https://codereview.chromium.org/2753843003/diff/120001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/2753843003/diff/120001/cc/scheduler/scheduler.h#newcode51 cc/scheduler/scheduler.h:51: virtual void ScheduledActionDoShortIdleWork(const BeginFrameArgs& args) = 0; ...
3 years, 9 months ago (2017-03-24 15:24:11 UTC) #15
Dan Elphick
https://codereview.chromium.org/2753843003/diff/120001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/2753843003/diff/120001/cc/scheduler/scheduler.h#newcode51 cc/scheduler/scheduler.h:51: virtual void ScheduledActionDoShortIdleWork(const BeginFrameArgs& args) = 0; On 2017/03/24 ...
3 years, 8 months ago (2017-03-29 16:02:44 UTC) #16
Sami
https://codereview.chromium.org/2753843003/diff/180001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/180001/cc/scheduler/scheduler.cc#newcode218 cc/scheduler/scheduler.cc:218: void Scheduler::ScheduleShortIdleWork(const BeginFrameArgs& args) { Let's rename this to ...
3 years, 8 months ago (2017-03-30 15:30:37 UTC) #17
Dan Elphick
Thanks! https://codereview.chromium.org/2753843003/diff/120001/cc/scheduler/scheduler_state_machine_unittest.cc File cc/scheduler/scheduler_state_machine_unittest.cc (right): https://codereview.chromium.org/2753843003/diff/120001/cc/scheduler/scheduler_state_machine_unittest.cc#newcode534 cc/scheduler/scheduler_state_machine_unittest.cc:534: EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_DO_SHORT_IDLE_WORK); On 2017/03/29 16:02:44, Dan Elphick wrote: > ...
3 years, 8 months ago (2017-04-06 16:10:17 UTC) #18
Sami
Thanks! I think this looks good now. Brian, would you mind verifying the logic here? ...
3 years, 8 months ago (2017-04-06 17:39:10 UTC) #21
Dan Elphick
https://codereview.chromium.org/2753843003/diff/200001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/200001/cc/scheduler/scheduler.cc#newcode219 cc/scheduler/scheduler.cc:219: // TODO(delphick): Do we need to log this? On ...
3 years, 8 months ago (2017-04-07 09:05:02 UTC) #22
brianderson
Thanks for improving short idle periods! https://codereview.chromium.org/2753843003/diff/220001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/220001/cc/scheduler/scheduler.cc#newcode220 cc/scheduler/scheduler.cc:220: compositor_timing_history_->BeginImplFrameNotExpectedSoon(); Do not ...
3 years, 8 months ago (2017-04-07 22:03:17 UTC) #24
Dan Elphick
https://codereview.chromium.org/2753843003/diff/220001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/220001/cc/scheduler/scheduler.cc#newcode220 cc/scheduler/scheduler.cc:220: compositor_timing_history_->BeginImplFrameNotExpectedSoon(); On 2017/04/07 22:03:16, brianderson wrote: > Do not ...
3 years, 8 months ago (2017-04-10 15:53:22 UTC) #25
brianderson
+Sunny for owner's review while I'm out.
3 years, 8 months ago (2017-04-17 21:40:40 UTC) #27
Dan Elphick
On 2017/04/17 21:40:40, brianderson wrote: > +Sunny for owner's review while I'm out. Hi Sunny, ...
3 years, 8 months ago (2017-04-19 09:40:57 UTC) #28
Sami
Thanks, lgtm with a few nits. Sunny, do you want to do a quick sanity ...
3 years, 8 months ago (2017-04-20 11:15:10 UTC) #29
Dan Elphick
Thanks! https://codereview.chromium.org/2753843003/diff/240001/cc/scheduler/scheduler_state_machine_unittest.cc File cc/scheduler/scheduler_state_machine_unittest.cc (right): https://codereview.chromium.org/2753843003/diff/240001/cc/scheduler/scheduler_state_machine_unittest.cc#newcode2050 cc/scheduler/scheduler_state_machine_unittest.cc:2050: bool expect_idle_work_before_impl_frame_deadline) { On 2017/04/20 11:15:10, Sami wrote: ...
3 years, 8 months ago (2017-04-20 12:39:46 UTC) #30
chromium-reviews
Yes I'll take a look at this today. On Thu, Apr 20, 2017, 5:39 AM ...
3 years, 8 months ago (2017-04-20 15:57:42 UTC) #31
sunnyps
lgtm % nits https://codereview.chromium.org/2753843003/diff/260001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/260001/cc/scheduler/scheduler.cc#newcode212 cc/scheduler/scheduler.cc:212: TRACE_EVENT0("cc", "Scheduler::BeginMainFrameNotExpectedUntil"); nit: might want to ...
3 years, 8 months ago (2017-04-20 18:36:48 UTC) #32
sunnyps
Forgot this: Please format your CL description to 80 cols. Thanks!
3 years, 8 months ago (2017-04-20 19:04:46 UTC) #33
Dan Elphick
Thanks https://codereview.chromium.org/2753843003/diff/260001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/2753843003/diff/260001/cc/scheduler/scheduler.cc#newcode212 cc/scheduler/scheduler.cc:212: TRACE_EVENT0("cc", "Scheduler::BeginMainFrameNotExpectedUntil"); On 2017/04/20 18:36:47, sunnyps wrote: > ...
3 years, 7 months ago (2017-04-26 16:31:44 UTC) #35
Dan Elphick
Added vollick@ for third_party/WebKit/Source/platform/scheduler OWNERS and enne@ for ui/compositor/compositor.h OWNERS.
3 years, 7 months ago (2017-04-26 16:44:28 UTC) #38
Dan Elphick
On 2017/04/26 16:44:28, Dan Elphick wrote: > Added vollick@ for third_party/WebKit/Source/platform/scheduler OWNERS and enne@ > ...
3 years, 7 months ago (2017-05-03 11:10:45 UTC) #40
enne (OOO)
content/renderer/gpu lgtm
3 years, 7 months ago (2017-05-03 18:53:20 UTC) #53
Ian Vollick
On 2017/05/03 18:53:20, enne wrote: > content/renderer/gpu lgtm ui/compositor/ lgtm.
3 years, 7 months ago (2017-05-04 15:57:03 UTC) #54
Dan Elphick
Adding aelias@ for content/browser/renderer_host/compositor_impl_android.h OWNERS
3 years, 7 months ago (2017-05-04 16:04:35 UTC) #56
aelias_OOO_until_Jul13
compositor_impl_android.h lgtm
3 years, 7 months ago (2017-05-04 18:30:13 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2753843003/340001
3 years, 7 months ago (2017-05-05 07:55:24 UTC) #60
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 10:21:07 UTC) #63
Message was sent while issue was closed.
Committed patchset #18 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/9db74aa87f97c709baf5d38b82fb...

Powered by Google App Engine
This is Rietveld 408576698