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

Issue 1012853003: Add DisplayScheduler for Surfaces (Closed)

Created:
5 years, 9 months ago by brianderson
Modified:
5 years, 7 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, simonhong, jamesr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add DisplayScheduler for Surfaces This uses a SyntheticBeginFrameSource and a simple BeginFrame + deadline to determine when to draw. A simple heuristic based on recent activity is used to detect currently active surfaces that we want to wait for. Future patches will put this in charge of sending BeginFrames to surface produces, recovering producer latency, and replace the heuristic with something more correct. BUG=467750 Committed: https://crrev.com/893604464fd906112dd5ff3eec9cc99f6ca645fc Cr-Commit-Position: refs/heads/master@{#324980}

Patch Set 1 #

Patch Set 2 : Use a more dynamic deadline #

Patch Set 3 : accidentally a return type #

Patch Set 4 : subtract default parent draw time from deadline #

Patch Set 5 : use heuristic for active surfaces; avoid drawing while resources locked; #

Total comments: 7

Patch Set 6 : DisplaySchedulerClient in preparation of unittests #

Total comments: 2

Patch Set 7 : Fix and add tests. Change BFS to be external. #

Total comments: 9

Patch Set 8 : actually add unit tests #

Total comments: 2

Patch Set 9 : invert resources_locked_by_browser_ #

Total comments: 2

Patch Set 10 : fix crash, address comments #

Patch Set 11 : small fixes + rebase #

Patch Set 12 : include dependent patch for trybots #

Total comments: 1

Patch Set 13 : fix 1 compile error and remove unused method #

Patch Set 14 : Don't use DisplayScheduler for mojo #

Patch Set 15 : rebase; fix mojo compile #

Patch Set 16 : skip late missed BFs; don't wait for browser long; renderer latency recovery heuristic #

Patch Set 17 : rebase #

Patch Set 18 : fix mojo again #

Total comments: 4

Patch Set 19 : change Browser references to root surfce #

Unified diffs Side-by-side diffs Delta from patch set Stats (+886 lines, -149 lines) Patch
M cc/cc.gyp 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
M cc/cc_tests.gyp 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/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +2 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +50 lines, -10 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 3 chunks +9 lines, -0 lines 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 16 3 chunks +6 lines, -1 line 0 comments Download
M cc/surfaces/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/surfaces/display.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +10 lines, -4 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +38 lines, -18 lines 0 comments Download
M cc/surfaces/display_client.h View 1 chunk +0 lines, -3 lines 0 comments Download
A cc/surfaces/display_scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +91 lines, -0 lines 0 comments Download
A cc/surfaces/display_scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +263 lines, -0 lines 0 comments Download
A cc/surfaces/display_scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +301 lines, -0 lines 0 comments Download
M cc/surfaces/display_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 11 chunks +78 lines, -39 lines 0 comments Download
M cc/surfaces/onscreen_display_client.h View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -13 lines 0 comments Download
M cc/surfaces/onscreen_display_client.cc View 1 2 3 4 5 6 7 8 9 3 chunks +20 lines, -44 lines 0 comments Download
M components/surfaces/display_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -3 lines 0 comments Download
M components/surfaces/display_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +7 lines, -11 lines 0 comments Download
M components/surfaces/surfaces_scheduler.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 components/surfaces/surfaces_scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (5 generated)
brianderson
Ptal. Still need to add unit tests, but would like some early feedback. The first ...
5 years, 9 months ago (2015-03-16 23:17:27 UTC) #2
mithro-old
On 2015/03/16 23:17:27, brianderson wrote: > Ptal. > > Still need to add unit tests, ...
5 years, 9 months ago (2015-03-23 01:23:55 UTC) #3
brianderson
Talked with Tim and I'm going to push the initial version of DisplayScheduler through to ...
5 years, 8 months ago (2015-04-03 01:35:48 UTC) #4
jbauman
https://codereview.chromium.org/1012853003/diff/80001/cc/surfaces/display.cc File cc/surfaces/display.cc (right): https://codereview.chromium.org/1012853003/diff/80001/cc/surfaces/display.cc#newcode65 cc/surfaces/display.cc:65: if (current_surface_id_ == id && device_scale_factor_ == device_scale_factor) On ...
5 years, 8 months ago (2015-04-03 22:27:51 UTC) #5
brianderson
ptal! Unit tests added. Comments about design decisions inline. https://codereview.chromium.org/1012853003/diff/100001/cc/surfaces/display_scheduler.cc File cc/surfaces/display_scheduler.cc (right): https://codereview.chromium.org/1012853003/diff/100001/cc/surfaces/display_scheduler.cc#newcode48 cc/surfaces/display_scheduler.cc:48: ...
5 years, 8 months ago (2015-04-07 02:32:20 UTC) #6
jbauman
https://codereview.chromium.org/1012853003/diff/120001/cc/surfaces/display_scheduler.cc File cc/surfaces/display_scheduler.cc (right): https://codereview.chromium.org/1012853003/diff/120001/cc/surfaces/display_scheduler.cc#newcode200 cc/surfaces/display_scheduler.cc:200: // TODO(brianderson): Figure out why supressing DrawAndSwap while On ...
5 years, 8 months ago (2015-04-07 23:51:31 UTC) #7
brianderson
https://codereview.chromium.org/1012853003/diff/120001/cc/surfaces/display_scheduler.cc File cc/surfaces/display_scheduler.cc (right): https://codereview.chromium.org/1012853003/diff/120001/cc/surfaces/display_scheduler.cc#newcode200 cc/surfaces/display_scheduler.cc:200: // TODO(brianderson): Figure out why supressing DrawAndSwap while On ...
5 years, 8 months ago (2015-04-08 02:23:02 UTC) #8
jbauman
lgtm with a few nits. https://codereview.chromium.org/1012853003/diff/160001/cc/surfaces/onscreen_display_client.cc File cc/surfaces/onscreen_display_client.cc (right): https://codereview.chromium.org/1012853003/diff/160001/cc/surfaces/onscreen_display_client.cc#newcode42 cc/surfaces/onscreen_display_client.cc:42: task_runner_, display_->GetMaxFramesPending())); This call ...
5 years, 8 months ago (2015-04-08 20:06:08 UTC) #9
brianderson
+James for owners review of mojo.
5 years, 8 months ago (2015-04-11 00:43:45 UTC) #11
jamesr
lgtm, although I'm not an owner here. Try sky
5 years, 8 months ago (2015-04-11 00:46:32 UTC) #13
brianderson
Hmm. Looks like I need to resolve some things with a SurfacesScheduler that the DisplayImpl ...
5 years, 8 months ago (2015-04-11 02:23:17 UTC) #14
sky
LGTM
5 years, 8 months ago (2015-04-13 15:35:07 UTC) #15
brianderson
I opened https://code.google.com/p/chromium/issues/detail?id=476676 to track the reconciliation of the existing SurfacesScheduler and this DisplayScheduler. This ...
5 years, 8 months ago (2015-04-13 21:29:59 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1012853003/280001
5 years, 8 months ago (2015-04-13 22:58:25 UTC) #19
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years, 8 months ago (2015-04-14 01:34:47 UTC) #20
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/893604464fd906112dd5ff3eec9cc99f6ca645fc Cr-Commit-Position: refs/heads/master@{#324980}
5 years, 8 months ago (2015-04-14 01:35:45 UTC) #21
brianderson
A revert of this CL (patchset #15 id:280001) has been created in https://codereview.chromium.org/1068743003/ by brianderson@chromium.org. ...
5 years, 8 months ago (2015-04-14 05:41:29 UTC) #22
brianderson
Sunny, John, and I looked at how the latest patch works with vsynctester on Windows ...
5 years, 7 months ago (2015-05-01 01:02:23 UTC) #23
brianderson
I was previously uploading to an incorrect patch. Latest upload includes previous rebase and a ...
5 years, 7 months ago (2015-05-01 19:04:25 UTC) #24
jbauman
https://codereview.chromium.org/1012853003/diff/340001/cc/surfaces/display_scheduler.cc File cc/surfaces/display_scheduler.cc (right): https://codereview.chromium.org/1012853003/diff/340001/cc/surfaces/display_scheduler.cc#newcode73 cc/surfaces/display_scheduler.cc:73: browser_damaged_ = true; Could this cause all_active_surfaces_ready_to_draw_ to be ...
5 years, 7 months ago (2015-05-02 01:20:04 UTC) #25
brianderson
I changed all "Browser" references to "root surface" based on John's recommendation. Need to fix ...
5 years, 7 months ago (2015-05-02 03:28:37 UTC) #26
brianderson
5 years, 7 months ago (2015-05-08 20:54:21 UTC) #27
Message was sent while issue was closed.
Moving code review for relanding to: https://codereview.chromium.org/1138563002

Powered by Google App Engine
This is Rietveld 408576698