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

Issue 22926024: cc: Control activation from the Scheduler (Closed)

Created:
7 years, 4 months ago by brianderson
Modified:
7 years, 3 months ago
Reviewers:
danakj, reveman, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, nduca, joth, boliu, jdduke (slow), Sami
Base URL:
http://git.chromium.org/chromium/src.git@schedOutputSurface4
Visibility:
Public.

Description

cc: Control activation from the Scheduler This threads the NotifyReadyToActivate signal all the way to the Scheduler, so that the Scheduler is the final arbiter of when to actually activate. With this information, we are also able to change the ScheduledActionActivateIfPossible to just ScheduledActionActivate, which will help reduce the number of calls to ManageTiles. This also checks if ManageTiles is needed after a commit. If it is not needed, the pending tree is ready for activation immediately. BUG=269272 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219714

Patch Set 1 #

Total comments: 7

Patch Set 2 : remove hacks, address comments, force activation to prevent deadlock #

Total comments: 2

Patch Set 3 : Remove SetHasPendingTree and ActivatePendingTreeIfNeeded #

Patch Set 4 : Fixes for tests #

Total comments: 9

Patch Set 5 : BlockNotifyReadyToActivateForTesting #

Total comments: 2

Patch Set 6 : Fixed all tests; Address comments; !tile_manager_ test pending #

Patch Set 7 : Fix clang compile #

Patch Set 8 : kill has_active_tree_ #

Total comments: 19

Patch Set 9 : address dana's comments #

Patch Set 10 : "If we are need" -> "If we need" #

Patch Set 11 : WillBeginImplFrameOnThread #

Total comments: 1

Patch Set 12 : git cl format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -284 lines) Patch
M cc/scheduler/scheduler.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 5 chunks +14 lines, -11 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 7 8 9 10 11 20 chunks +196 lines, -136 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl_client.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M cc/test/layer_tree_test.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +22 lines, -19 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 5 chunks +8 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +13 lines, -36 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 4 chunks +6 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +17 lines, -27 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 1 2 3 4 5 chunks +3 lines, -14 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M cc/trees/thread_proxy.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 chunks +8 lines, -13 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
brianderson
PTAL. Tests still need a lot of love, but the patch is otherwise ready for ...
7 years, 4 months ago (2013-08-23 03:49:25 UTC) #1
reveman
https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h#newcode71 cc/scheduler/scheduler.h:71: void SetHasTrees(bool has_pending_tree, bool active_tree_is_null); has_active_tree? find it confusing ...
7 years, 4 months ago (2013-08-23 16:16:47 UTC) #2
enne (OOO)
https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h#newcode71 cc/scheduler/scheduler.h:71: void SetHasTrees(bool has_pending_tree, bool active_tree_is_null); On 2013/08/23 16:16:48, David ...
7 years, 4 months ago (2013-08-23 17:54:08 UTC) #3
brianderson
Another version incoming that removes the two hacks I said I would remove. https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h File ...
7 years, 4 months ago (2013-08-23 18:17:37 UTC) #4
danakj
On Fri, Aug 23, 2013 at 2:17 PM, <brianderson@chromium.org> wrote: > Another version incoming that ...
7 years, 4 months ago (2013-08-23 18:29:55 UTC) #5
enne (OOO)
https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h#newcode71 cc/scheduler/scheduler.h:71: void SetHasTrees(bool has_pending_tree, bool active_tree_is_null); On 2013/08/23 18:17:38, Brian ...
7 years, 4 months ago (2013-08-23 18:30:35 UTC) #6
brianderson
On 2013/08/23 18:30:35, enne wrote: > https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h > File cc/scheduler/scheduler.h (right): > > https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler.h#newcode71 > ...
7 years, 4 months ago (2013-08-23 20:49:19 UTC) #7
brianderson
On 2013/08/23 18:29:55, danakj wrote: > On Fri, Aug 23, 2013 at 2:17 PM, <mailto:brianderson@chromium.org> ...
7 years, 4 months ago (2013-08-23 20:50:17 UTC) #8
brianderson
https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/22926024/diff/1/cc/scheduler/scheduler_state_machine.cc#newcode330 cc/scheduler/scheduler_state_machine.cc:330: // We do not want to activate a second ...
7 years, 4 months ago (2013-08-23 20:51:59 UTC) #9
brianderson
PTAL again.
7 years, 4 months ago (2013-08-23 21:22:20 UTC) #10
enne (OOO)
https://codereview.chromium.org/22926024/diff/13001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/22926024/diff/13001/cc/scheduler/scheduler.h#newcode71 cc/scheduler/scheduler.h:71: void SetHasPendingTree(bool has_pending_tree); I'm also not sure why the ...
7 years, 4 months ago (2013-08-23 21:38:36 UTC) #11
brianderson
https://codereview.chromium.org/22926024/diff/13001/cc/scheduler/scheduler.h File cc/scheduler/scheduler.h (right): https://codereview.chromium.org/22926024/diff/13001/cc/scheduler/scheduler.h#newcode71 cc/scheduler/scheduler.h:71: void SetHasPendingTree(bool has_pending_tree); On 2013/08/23 21:38:36, enne wrote: > ...
7 years, 4 months ago (2013-08-23 23:11:52 UTC) #12
brianderson
I'm working on the unit tests now and notice that tests that do readbacks are ...
7 years, 4 months ago (2013-08-23 23:19:42 UTC) #13
brianderson
PTAL. I got rid of SetHasPendingTree. I also got rid of ActivatePendingTreeIfNecessary, since other places ...
7 years, 4 months ago (2013-08-24 00:22:56 UTC) #14
brianderson
A number of test fixes, but I wonder if the LayerTreeHostImplClientInterposer is too hacky. https://codereview.chromium.org/22926024/diff/29001/cc/test/layer_tree_test.cc ...
7 years, 4 months ago (2013-08-24 02:33:28 UTC) #15
brianderson
On 2013/08/24 02:33:28, Brian Anderson wrote: > A number of test fixes, but I wonder ...
7 years, 4 months ago (2013-08-24 16:05:03 UTC) #16
enne (OOO)
This looks really solid. I have a few small questions: https://codereview.chromium.org/22926024/diff/29001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/22926024/diff/29001/cc/scheduler/scheduler_state_machine.cc#newcode548 ...
7 years, 3 months ago (2013-08-26 21:55:13 UTC) #17
enne (OOO)
Oops, I missed that you'd updated this patch. https://codereview.chromium.org/22926024/diff/33001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/22926024/diff/33001/cc/trees/layer_tree_host_impl.cc#newcode175 cc/trees/layer_tree_host_impl.cc:175: block_notify_ready_to_activate_for_testing_(false), ...
7 years, 3 months ago (2013-08-26 21:57:52 UTC) #18
brianderson
https://codereview.chromium.org/22926024/diff/29001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (left): https://codereview.chromium.org/22926024/diff/29001/cc/trees/layer_tree_host_impl.cc#oldcode1461 cc/trees/layer_tree_host_impl.cc:1461: if (!tile_manager_ || tile_manager_->AreTilesRequiredForActivationReady()) { On 2013/08/26 21:55:13, enne ...
7 years, 3 months ago (2013-08-26 22:47:25 UTC) #19
brianderson
All tests should be passing now in the most recent patch. I've addressed all of ...
7 years, 3 months ago (2013-08-26 23:06:25 UTC) #20
brianderson
https://codereview.chromium.org/22926024/diff/29001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (left): https://codereview.chromium.org/22926024/diff/29001/cc/trees/layer_tree_host_impl.cc#oldcode1461 cc/trees/layer_tree_host_impl.cc:1461: if (!tile_manager_ || tile_manager_->AreTilesRequiredForActivationReady()) { On 2013/08/26 21:55:13, enne ...
7 years, 3 months ago (2013-08-26 23:33:20 UTC) #21
enne (OOO)
On 2013/08/26 23:33:20, Brian Anderson wrote: > In looking at how to implement this test, ...
7 years, 3 months ago (2013-08-26 23:41:13 UTC) #22
enne (OOO)
lgtm https://codereview.chromium.org/22926024/diff/36001/cc/trees/layer_tree_host_impl.h File cc/trees/layer_tree_host_impl.h (right): https://codereview.chromium.org/22926024/diff/36001/cc/trees/layer_tree_host_impl.h#newcode190 cc/trees/layer_tree_host_impl.h:190: virtual void BlockNotifyReadyToActivateForTesting(bool block); I think maybe these ...
7 years, 3 months ago (2013-08-26 23:50:10 UTC) #23
danakj
https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc#newcode218 cc/scheduler/scheduler_state_machine.cc:218: // These are all the cases where, if we ...
7 years, 3 months ago (2013-08-27 00:59:12 UTC) #24
danakj
https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc#newcode311 cc/scheduler/scheduler_state_machine.cc:311: output_surface_state_ != OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION) What if the active tree hasn't ...
7 years, 3 months ago (2013-08-27 01:24:02 UTC) #25
brianderson
https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc#newcode218 cc/scheduler/scheduler_state_machine.cc:218: // These are all the cases where, if we ...
7 years, 3 months ago (2013-08-27 01:45:37 UTC) #26
danakj
https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc#newcode311 cc/scheduler/scheduler_state_machine.cc:311: output_surface_state_ != OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION) On 2013/08/27 01:45:37, Brian Anderson wrote: ...
7 years, 3 months ago (2013-08-27 02:03:47 UTC) #27
danakj
On 2013/08/27 02:03:47, danakj wrote: > https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc > File cc/scheduler/scheduler_state_machine.cc (right): > > https://codereview.chromium.org/22926024/diff/36001/cc/scheduler/scheduler_state_machine.cc#newcode311 > ...
7 years, 3 months ago (2013-08-27 02:05:58 UTC) #28
danakj
Oh, and LGTM!
7 years, 3 months ago (2013-08-27 02:06:09 UTC) #29
danakj
https://codereview.chromium.org/22926024/diff/77001/cc/test/layer_tree_test.h File cc/test/layer_tree_test.h (right): https://codereview.chromium.org/22926024/diff/77001/cc/test/layer_tree_test.h#newcode35 cc/test/layer_tree_test.h:35: const BeginFrameArgs& args) {} (indenting)
7 years, 3 months ago (2013-08-27 02:06:28 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/22926024/61018
7 years, 3 months ago (2013-08-27 02:21:00 UTC) #31
commit-bot: I haz the power
7 years, 3 months ago (2013-08-27 06:33:49 UTC) #32
Message was sent while issue was closed.
Change committed as 219714

Powered by Google App Engine
This is Rietveld 408576698