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

Issue 23495022: CC: Add a scheduled action for ManageTiles (Closed)

Created:
7 years, 3 months ago by epenner
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

CC: Add a scheduled action for ManageTiles Other than commits, ManageTiles should be coalesced to happen on a semi-regular basis. This used to happen during draws, but this is not reliable as draws might not occur, nor we shouldn't force them to. This adds a scheduled action for ManagingTiles, and the ability to request this action, similar to requesting draws etc. BUG=264566 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223182

Patch Set 1 : #

Total comments: 5

Patch Set 2 : Address feedback. #

Patch Set 3 : Call ManageTiles. #

Total comments: 6

Patch Set 4 : Scheduled Action. #

Patch Set 5 : Add to AsValue #

Total comments: 10

Patch Set 6 : Reduce scope to scheduler. #

Total comments: 5

Patch Set 7 : Fix build/tests. #

Patch Set 8 : Add tests. #

Patch Set 9 : Rebase. #

Patch Set 10 : Use frame count instead of begin-frame throttling #

Total comments: 7

Patch Set 11 : Add failing test. #

Patch Set 12 : Remove once-per-frame check. #

Patch Set 13 : Fix grammar. #

Total comments: 4

Patch Set 14 : Remove unused. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -31 lines) Patch
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 5 chunks +11 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +15 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +17 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 9 chunks +39 lines, -1 line 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +88 lines, -3 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, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +5 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 5 chunks +14 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -6 lines 0 comments Download

Messages

Total messages: 57 (0 generated)
epenner
Ptal.
7 years, 3 months ago (2013-09-03 18:24:56 UTC) #1
vangelis
If we're not going to be activating the pending tree in smoothness mode, is there ...
7 years, 3 months ago (2013-09-03 18:40:28 UTC) #2
epenner
On 2013/09/03 18:40:28, vangelis wrote: > If we're not going to be activating the pending ...
7 years, 3 months ago (2013-09-03 18:48:36 UTC) #3
reveman
https://codereview.chromium.org/23495022/diff/4001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/23495022/diff/4001/cc/resources/tile_manager.cc#newcode249 cc/resources/tile_manager.cc:249: bool can_activate = true; can you drop this and ...
7 years, 3 months ago (2013-09-03 19:03:21 UTC) #4
enne (OOO)
On 2013/09/03 18:40:28, vangelis wrote: > If we're not going to be activating the pending ...
7 years, 3 months ago (2013-09-03 19:11:12 UTC) #5
epenner
https://codereview.chromium.org/23495022/diff/4001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/23495022/diff/4001/cc/trees/layer_tree_host_impl.cc#newcode2477 cc/trees/layer_tree_host_impl.cc:2477: client_->SetNeedsRedrawOnImplThread(); On 2013/09/03 19:11:13, enne wrote: > Sorry, but ...
7 years, 3 months ago (2013-09-03 19:27:53 UTC) #6
epenner
Addressed feedback. Ptal for just the activation blocking part. I won't land this patch until ...
7 years, 3 months ago (2013-09-03 19:36:28 UTC) #7
epenner
It looks like ManageTiles is for the most part coalesced into draws, except for some ...
7 years, 3 months ago (2013-09-03 21:16:14 UTC) #8
epenner
Ping. Ptal for this one. This one will have to land first: https://codereview.chromium.org/23686011/
7 years, 3 months ago (2013-09-07 00:48:08 UTC) #9
epenner
> https://codereview.chromium.org/23686011/ The above patch has landed. So this patch should be sufficient to solve ...
7 years, 3 months ago (2013-09-09 19:26:32 UTC) #10
vmpstr
On 2013/09/09 19:26:32, epenner wrote: > > https://codereview.chromium.org/23686011/ > > The above patch has landed. ...
7 years, 3 months ago (2013-09-09 21:44:57 UTC) #11
epennerAtGoogle
On 2013/09/09 21:44:57, vmpstr wrote: > On 2013/09/09 19:26:32, epenner wrote: > > > https://codereview.chromium.org/23686011/ ...
7 years, 3 months ago (2013-09-09 21:53:03 UTC) #12
epenner
Ptal. Reveman/Enne, can you comment on the bug if you think we need further work ...
7 years, 3 months ago (2013-09-10 02:04:57 UTC) #13
brianderson
https://codereview.chromium.org/23495022/diff/22001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/23495022/diff/22001/cc/resources/tile_manager.cc#newcode269 cc/resources/tile_manager.cc:269: if (!allow_rasterize_on_demand) Instead of calling ManageTiles again, would it ...
7 years, 3 months ago (2013-09-10 02:35:18 UTC) #14
epenner
https://codereview.chromium.org/23495022/diff/22001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/23495022/diff/22001/cc/resources/tile_manager.cc#newcode269 cc/resources/tile_manager.cc:269: if (!allow_rasterize_on_demand) On 2013/09/10 02:35:19, Brian Anderson wrote: > ...
7 years, 3 months ago (2013-09-10 18:13:38 UTC) #15
reveman
https://codereview.chromium.org/23495022/diff/22001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/23495022/diff/22001/cc/resources/tile_manager.cc#newcode269 cc/resources/tile_manager.cc:269: if (!allow_rasterize_on_demand) On 2013/09/10 18:13:39, epenner wrote: > On ...
7 years, 3 months ago (2013-09-10 19:21:19 UTC) #16
epennerAtGoogle
https://codereview.chromium.org/23495022/diff/22001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/23495022/diff/22001/cc/trees/layer_tree_host_impl.cc#newcode2521 cc/trees/layer_tree_host_impl.cc:2521: if (priority != SMOOTHNESS_TAKES_PRIORITY) On 2013/09/10 19:21:20, David Reveman ...
7 years, 3 months ago (2013-09-10 19:36:54 UTC) #17
reveman
https://codereview.chromium.org/23495022/diff/22001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/23495022/diff/22001/cc/trees/layer_tree_host_impl.cc#newcode2521 cc/trees/layer_tree_host_impl.cc:2521: if (priority != SMOOTHNESS_TAKES_PRIORITY) On 2013/09/10 19:36:55, epennerAtGoogle wrote: ...
7 years, 3 months ago (2013-09-10 19:57:53 UTC) #18
epennerAtGoogle
> How are we guaranteeing that a new frame is produced immediately after enter > ...
7 years, 3 months ago (2013-09-10 21:07:09 UTC) #19
epenner
> In some cases that's not enough, and stalling activation during smoothness mode > creates ...
7 years, 3 months ago (2013-09-10 21:15:52 UTC) #20
enne (OOO)
On 2013/09/10 21:15:52, epenner wrote: > If there is too many cases where we call ...
7 years, 3 months ago (2013-09-10 21:25:15 UTC) #21
epennerAtGoogle
> Moving it to the scheduler sounds like a good plan to me. That feels ...
7 years, 3 months ago (2013-09-10 22:15:56 UTC) #22
epenner
> However, since that's purely a refactor, and this patch doesn't make inefficient > ManageTiles ...
7 years, 3 months ago (2013-09-11 02:00:31 UTC) #23
reveman
I like the direction of this. I prefer to see the scheduler changes land first ...
7 years, 3 months ago (2013-09-11 15:27:45 UTC) #24
brianderson
https://codereview.chromium.org/23495022/diff/43001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (left): https://codereview.chromium.org/23495022/diff/43001/cc/trees/layer_tree_host_impl.cc#oldcode261 cc/trees/layer_tree_host_impl.cc:261: ManageTiles(); Will this ManageTiles() be a redundant call now ...
7 years, 3 months ago (2013-09-11 17:10:29 UTC) #25
brianderson
https://codereview.chromium.org/23495022/diff/43001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/43001/cc/scheduler/scheduler_state_machine.cc#newcode448 cc/scheduler/scheduler_state_machine.cc:448: bool SchedulerStateMachine::ShouldManageTiles() const { Should this function be throttling ...
7 years, 3 months ago (2013-09-11 17:46:26 UTC) #26
epennerAtGoogle
I realized I also need to change WillModifyTilePriority to DidModifyTilePriority if this function will trigger ...
7 years, 3 months ago (2013-09-11 18:42:59 UTC) #27
epennerAtGoogle
On 2013/09/11 18:42:59, epennerAtGoogle wrote: > I realized I also need to change WillModifyTilePriority to ...
7 years, 3 months ago (2013-09-11 18:49:54 UTC) #28
epenner
Okay I've reduced this to only the scheduled-action change, and addressed most feedback. I haven't ...
7 years, 3 months ago (2013-09-11 22:39:37 UTC) #29
epenner
https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc#newcode765 cc/scheduler/scheduler_state_machine.cc:765: return true; Brianderson@, is there anything I need to ...
7 years, 3 months ago (2013-09-11 22:55:46 UTC) #30
epenner
Changes the subject and description for reduced scope. Ptal.
7 years, 3 months ago (2013-09-11 22:59:37 UTC) #31
brianderson
https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc#newcode765 cc/scheduler/scheduler_state_machine.cc:765: return true; On 2013/09/11 22:55:47, epenner wrote: > Brianderson@, ...
7 years, 3 months ago (2013-09-11 23:14:37 UTC) #32
enne (OOO)
https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc#newcode448 cc/scheduler/scheduler_state_machine.cc:448: bool SchedulerStateMachine::ShouldManageTiles() const { Yeah, I agree strongly with ...
7 years, 3 months ago (2013-09-11 23:45:11 UTC) #33
epennerAtGoogle
https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc#newcode448 cc/scheduler/scheduler_state_machine.cc:448: bool SchedulerStateMachine::ShouldManageTiles() const { On 2013/09/11 23:45:11, enne wrote: ...
7 years, 3 months ago (2013-09-12 00:09:59 UTC) #34
brianderson
https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/52001/cc/scheduler/scheduler_state_machine.cc#newcode448 cc/scheduler/scheduler_state_machine.cc:448: bool SchedulerStateMachine::ShouldManageTiles() const { On 2013/09/12 00:09:59, epennerAtGoogle wrote: ...
7 years, 3 months ago (2013-09-12 00:24:07 UTC) #35
epennerAtGoogle
> Yes, the extra throttling is only required for the synchronous compositor, but > should ...
7 years, 3 months ago (2013-09-12 00:32:54 UTC) #36
epenner
Hmm.. One possibility would be to mark if there is a commit, and the move ...
7 years, 3 months ago (2013-09-12 02:01:26 UTC) #37
enne (OOO)
Tests?
7 years, 3 months ago (2013-09-12 17:17:50 UTC) #38
epennerAtGoogle
On 2013/09/12 17:17:50, enne wrote: > Tests? Coming right up :)
7 years, 3 months ago (2013-09-12 18:03:56 UTC) #39
epenner
Added some tests and DCHECKs. Ptal.
7 years, 3 months ago (2013-09-12 23:24:54 UTC) #40
epenner
On 2013/09/12 23:24:54, epenner wrote: > Added some tests and DCHECKs. Ptal. Just switched the ...
7 years, 3 months ago (2013-09-13 00:14:41 UTC) #41
brianderson
The way you are throttling ManageTiles will limit it to a single scheduled call per ...
7 years, 3 months ago (2013-09-13 00:28:59 UTC) #42
epennerAtGoogle
Yes it doesn't throttle the other synchronous ManageTiles calls... I called it 'ScheduledManageTiles' to try ...
7 years, 3 months ago (2013-09-13 00:37:55 UTC) #43
brianderson
Scheduler changes lgtm. https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler.cc#newcode69 cc/scheduler/scheduler.cc:69: DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_MANAGE_TILES)); On 2013/09/13 00:37:56, epennerAtGoogle wrote: ...
7 years, 3 months ago (2013-09-13 00:42:33 UTC) #44
enne (OOO)
https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler.cc#newcode234 cc/scheduler/scheduler.cc:234: mark_inside_action(&inside_action_, action); Nifty! https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc#newcode455 cc/scheduler/scheduler_state_machine.cc:455: ...
7 years, 3 months ago (2013-09-13 00:47:00 UTC) #45
epennerAtGoogle
https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc#newcode455 cc/scheduler/scheduler_state_machine.cc:455: bool SchedulerStateMachine::ShouldManageTiles() const { On 2013/09/13 00:47:01, enne wrote: ...
7 years, 3 months ago (2013-09-13 00:53:05 UTC) #46
brianderson
https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc#newcode455 cc/scheduler/scheduler_state_machine.cc:455: bool SchedulerStateMachine::ShouldManageTiles() const { On 2013/09/13 00:47:01, enne wrote: ...
7 years, 3 months ago (2013-09-13 00:59:51 UTC) #47
epennerAtGoogle
On 2013/09/13 00:59:51, Brian Anderson wrote: > https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc > File cc/scheduler/scheduler_state_machine.cc (right): > > https://codereview.chromium.org/23495022/diff/34001/cc/scheduler/scheduler_state_machine.cc#newcode455 ...
7 years, 3 months ago (2013-09-13 01:15:14 UTC) #48
epennerAtGoogle
Hmm, is_inside_throttled_event_ ?
7 years, 3 months ago (2013-09-13 01:16:36 UTC) #49
brianderson
On 2013/09/13 01:16:36, epennerAtGoogle wrote: > Hmm, is_inside_throttled_event_ ? Adding inside_polling_for_anticipated_draw_triggers_ sounds good. If you ...
7 years, 3 months ago (2013-09-13 01:33:57 UTC) #50
epennerAtGoogle
On 2013/09/13 01:33:57, Brian Anderson wrote: > On 2013/09/13 01:16:36, epennerAtGoogle wrote: > > Hmm, ...
7 years, 3 months ago (2013-09-13 01:54:58 UTC) #51
brianderson
Scheduler changes lgtm.
7 years, 3 months ago (2013-09-13 02:01:41 UTC) #52
enne (OOO)
https://codereview.chromium.org/23495022/diff/99001/cc/scheduler/scheduler_unittest.cc File cc/scheduler/scheduler_unittest.cc (right): https://codereview.chromium.org/23495022/diff/99001/cc/scheduler/scheduler_unittest.cc#newcode747 cc/scheduler/scheduler_unittest.cc:747: // Draw. The draw will trigger SetNeedsManageTiles, and Where ...
7 years, 3 months ago (2013-09-13 18:15:01 UTC) #53
epenner
https://codereview.chromium.org/23495022/diff/99001/cc/scheduler/scheduler_unittest.cc File cc/scheduler/scheduler_unittest.cc (right): https://codereview.chromium.org/23495022/diff/99001/cc/scheduler/scheduler_unittest.cc#newcode747 cc/scheduler/scheduler_unittest.cc:747: // Draw. The draw will trigger SetNeedsManageTiles, and On ...
7 years, 3 months ago (2013-09-13 18:45:44 UTC) #54
enne (OOO)
lgtm
7 years, 3 months ago (2013-09-13 18:48:17 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/23495022/65017
7 years, 3 months ago (2013-09-13 19:14:30 UTC) #56
commit-bot: I haz the power
7 years, 3 months ago (2013-09-14 00:02:14 UTC) #57
Message was sent while issue was closed.
Change committed as 223182

Powered by Google App Engine
This is Rietveld 408576698