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

Issue 1131633003: cc: Use multiple PrepareTiles approaches

Created:
5 years, 7 months ago by brianderson
Modified:
5 years, 6 months ago
Reviewers:
vmpstr, enne (OOO)
CC:
aelias_OOO_until_Jul13, cc-bugs_chromium.org, chromium-reviews, scheduler-bugs_chromium.org, sunnyps, vmiura, esprehn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use multiple PrepareTiles approaches PRIORITIZE_LATENCY: What we have before the patch. This approach calls PrepareTiles after every commit and after draws if there wasn't a commit for that frame. With this approach, we cannot trust NotifyReadyToActivate and NotifyReadyToDraw and they should only be used as hints. All other approaches have trustworthy NotifyReadyToActivate's and NotifyReadyToDraw's. Goes to ACTIVE_WORK on first checkerboard detection. ACCURATE_ACTIVE_WORK: This approach only calls PrepareTiles at the start of a frame so new active tree work starts ASAP, but the pending tree work doesn't. Goes back to PRIORITIZE_LATENCY on idle. The following major changes were needed to support this: * PrepareTiles only initiated by the scheduler now. * New DrawResult for when raster source for visible tile is missing. * DrawAndSwapForced return value was ignored. * DrawAndSwapIfPossible always fails on checkerboard now. * Scheduler uses DrawAndSwapForced if it really wants to checkerboard. * Scheduler decides how to handle high res required to draw. * Update action after actually running it for DrawResult. * Forced redraw logic removed. * Deadline repost on aborted draw due to checkerboards. BUG=486072, 475639 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix raster source detection #

Total comments: 5

Patch Set 3 : UpdateState -> WillAction+DoAction #

Patch Set 4 : Retry BeginImplFrame after an abort due to checkerboards #

Patch Set 5 : retry ImplFrame and Deadline on checkerboard #

Patch Set 6 : rebase; UpdateStateOn->Will/Did #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -294 lines) Patch
M cc/layers/append_quads_data.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 2 chunks +15 lines, -8 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M cc/scheduler/draw_result.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler.h View 1 2 3 4 5 chunks +5 lines, -2 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 11 chunks +58 lines, -12 lines 0 comments Download
M cc/scheduler/scheduler_settings.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M cc/scheduler/scheduler_settings.cc View 1 2 3 4 5 2 chunks +0 lines, -6 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 9 chunks +73 lines, -24 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 31 chunks +262 lines, -156 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl_client.h View 2 chunks +1 line, -2 lines 0 comments Download
M cc/tiles/picture_layer_tiling.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/tiles/picture_layer_tiling.cc View 1 2 3 4 5 6 1 chunk +8 lines, -0 lines 0 comments Download
M cc/tiles/tile_manager_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 4 chunks +6 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 11 chunks +42 lines, -30 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 2 chunks +0 lines, -6 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 3 chunks +7 lines, -9 lines 0 comments Download
M cc/trees/thread_proxy.h View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 5 chunks +7 lines, -14 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
brianderson
Don't need a detailed review yet, but looking for some high level feedback regarding the ...
5 years, 7 months ago (2015-05-16 02:39:57 UTC) #2
vmpstr
https://codereview.chromium.org/1131633003/diff/1/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/1131633003/diff/1/cc/layers/picture_layer_impl.cc#newcode278 cc/layers/picture_layer_impl.cc:278: bool raster_source_covers_tile = *iter; On 2015/05/16 02:39:57, brianderson wrote: ...
5 years, 7 months ago (2015-05-18 17:20:48 UTC) #3
enne (OOO)
Am I reading this correctly that the goal here is to land this so that ...
5 years, 7 months ago (2015-05-18 21:40:50 UTC) #4
brianderson
Changed how I detect if there's a raster source. Ptal at the parts where I ...
5 years, 7 months ago (2015-05-19 02:40:35 UTC) #5
enne (OOO)
On 2015/05/19 at 02:40:35, brianderson wrote: > Changed how I detect if there's a raster ...
5 years, 7 months ago (2015-05-19 22:53:42 UTC) #6
brianderson
> This sounds like the kind of error I was expecting to see. Is this ...
5 years, 7 months ago (2015-05-20 01:33:17 UTC) #7
mithro-old
I'll try and look closer at this patch, but wanted to make some comments from ...
5 years, 7 months ago (2015-05-27 06:13:47 UTC) #8
brianderson
5 years, 7 months ago (2015-05-27 17:01:07 UTC) #9
On 2015/05/27 06:13:47, mithro wrote:
> I'll try and look closer at this patch, but wanted to make some comments from
> your CL description.
> 
> I'm a bit sceptical about anything which adds new "modes" into the scheduler,
> they often have complex interactions with all the other "modes" that the
> scheduler has.

I would love to get away with not having two modes, but I don't think that will
be feasible until UpdateDrawProperties and PrepareTiles are both super cheap. My
previous attempt at this did not have modes and there were concerns around
regressing both latency and throughput. This two mode approach makes sure we
only regress performance in the <1% of cases where we encounter checkerboard.

> 
> I am however very supportive of a lot of things this CL proposes to do in the
> process of trying to add modes. The idea that the scheduler is in control of
> PrepareTiles and reworking the DrawAndSwap stuff sounds good to me. 
> 
> It definitely feels like choosing to checker board should be a scheduling
> decision based on the scheduler's understanding about if the drawing is a
> temporary stall or something which will continue for longer period.

Powered by Google App Engine
This is Rietveld 408576698