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

Issue 820743002: cc: GPU rasterize tiles synchronously in PrepareToDraw. (Closed)

Created:
6 years ago by hendrikw
Modified:
5 years, 11 months ago
Reviewers:
danakj, ernstm, vmpstr, vmiura
CC:
chromium-reviews, cc-bugs_chromium.org, reveman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: GPU rasterize tiles synchronously in PrepareToDraw This is another version of Manfred's patch to rasterize GPU tiles synchronously. Original: https://codereview.chromium.org/733773005/ vmiura's merge (plus fixes): https://codereview.chromium.org/807233002/ * Adds Rasterizer base class, derives a Software and Gpu rasterizer * GpuRasterizer rasterizes the tiles synchronously * SoftwareRasterizer does basically nothing (but returns the prepare mode) * Gutted parts of GpuTileTaskWorkerPool, this probably needs to be removed completely. It doesn't do real work anymore. There was investigation into doing the raster work in this class, but it looks like we might start using one or zero copy for gpu rasterization in the future. * TileManager has two modes now: * create raster tasks and do nothing * don't create tasks and rasterize synchronously - there was some investigation into separating these better but vmiura's next change will start adding decode tasks. Some of this may become more clear when his stuff is committed. synchronously, * There's some code duplication in TileManager, but vmiura assures me that his patch will address that. More specifically, some of the code in PrepareTiles will always be executed, and then removed from SynchronouslyRasterizeTiles * Added a test that exercises GpuRasterizer and verifies that it creates resources BUG=434889 Committed: https://crrev.com/2f32e4ee3c21e0bd9ca26d7fa63cf14ed49d8a3b Cr-Commit-Position: refs/heads/master@{#309866}

Patch Set 1 #

Patch Set 2 : some fixups #

Patch Set 3 : tweaks #

Patch Set 4 : merge with latest #

Patch Set 5 : format and merge #

Total comments: 31

Patch Set 6 : address some of the review comments #

Total comments: 1

Patch Set 7 : rasterize all tiles for now #

Patch Set 8 : and remove unused var #

Patch Set 9 : added a unit test and split off CreateRasterizerr #

Patch Set 10 : added missing case in switch #

Patch Set 11 : hopefully address vmpstr's issue #

Patch Set 12 : removed extra notifyreadytodraw #

Patch Set 13 : merge #

Patch Set 14 : merge again #

Total comments: 1

Patch Set 15 : address review comment #

Patch Set 16 : why wasn't that picked up by presubmit? #

Total comments: 9

Patch Set 17 : split out some of OnRasterTaskCompleted to UpdateTileDrawInfo #

Total comments: 15

Patch Set 18 : address review comments #

Total comments: 1

Patch Set 19 : readd the continue for tiles not required for draw #

Total comments: 3

Patch Set 20 : more review comments address #

Patch Set 21 : remove raw pointer #

Patch Set 22 : merge again #

Patch Set 23 : override added :( #

Unified diffs Side-by-side diffs Delta from patch set Stats (+641 lines, -172 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M cc/cc.gyp View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
A cc/resources/gpu_rasterizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +62 lines, -0 lines 0 comments Download
A cc/resources/gpu_rasterizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +147 lines, -0 lines 0 comments Download
M cc/resources/gpu_tile_task_worker_pool.h View 3 chunks +4 lines, -17 lines 0 comments Download
M cc/resources/gpu_tile_task_worker_pool.cc View 1 2 3 4 5 6 7 8 5 chunks +19 lines, -88 lines 0 comments Download
A cc/resources/rasterizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +47 lines, -0 lines 0 comments Download
A cc/resources/software_rasterizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +37 lines, -0 lines 0 comments Download
A cc/resources/software_rasterizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +29 lines, -0 lines 0 comments Download
M cc/resources/tile_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 9 chunks +23 lines, -8 lines 0 comments Download
M cc/resources/tile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 14 chunks +151 lines, -31 lines 0 comments Download
M cc/resources/tile_manager_perftest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_task_worker_pool_perftest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M cc/resources/tile_task_worker_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M cc/test/fake_tile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -9 lines 0 comments Download
M cc/test/layer_tree_pixel_resource_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/layer_tree_pixel_resource_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +24 lines, -3 lines 0 comments Download
M cc/test/layer_tree_test.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 cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -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 14 15 16 17 18 19 20 21 3 chunks +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +24 lines, -11 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +42 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (7 generated)
hendrikw
PTAL, thanks
5 years, 12 months ago (2014-12-23 02:42:33 UTC) #2
vmpstr
The PrepareTilesMode feels like it could be cleaner if it was just two bools: something ...
5 years, 12 months ago (2014-12-23 09:51:03 UTC) #3
vmpstr
Hit send after reviewing tile_manager :P but here's one more comment https://codereview.chromium.org/820743002/diff/80001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): ...
5 years, 12 months ago (2014-12-23 09:54:43 UTC) #4
danakj
On Mon, Dec 22, 2014 at 6:42 PM, <hendrikw@chromium.org> wrote: > LayerTreeHostOnDemandRasterPixelTestWithGpuRasterizationForc > ed.RasterPictureLayer > ...
5 years, 12 months ago (2014-12-23 16:16:13 UTC) #5
danakj
On Tue, Dec 23, 2014 at 8:15 AM, Dana Jansens <danakj@chromium.org> wrote: > On Mon, ...
5 years, 12 months ago (2014-12-23 16:54:29 UTC) #6
hendrikw
I made a few of the requested changes. https://codereview.chromium.org/820743002/diff/80001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/820743002/diff/80001/cc/resources/gpu_rasterizer.cc#newcode32 cc/resources/gpu_rasterizer.cc:32: const ...
5 years, 12 months ago (2014-12-23 18:10:33 UTC) #7
hendrikw
On 2014/12/23 09:51:03, vmpstr wrote: > It also feels like we need to deconstruct tile ...
5 years, 12 months ago (2014-12-23 18:23:17 UTC) #9
vmiura
https://codereview.chromium.org/820743002/diff/80001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/820743002/diff/80001/cc/resources/gpu_rasterizer.cc#newcode62 cc/resources/gpu_rasterizer.cc:62: return tile_prepare_enabled_ ? PrepareTilesMode::PREPARE_PRIORITIZED_TILES On 2014/12/23 09:51:02, vmpstr wrote: ...
5 years, 12 months ago (2014-12-23 18:33:14 UTC) #10
hendrikw
removed the border raster stuff vmiura suggested should be moved into followup https://codereview.chromium.org/820743002/diff/80001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc ...
5 years, 12 months ago (2014-12-23 18:54:30 UTC) #11
vmiura
https://codereview.chromium.org/820743002/diff/80001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/820743002/diff/80001/cc/trees/layer_tree_host_impl.cc#newcode1959 cc/trees/layer_tree_host_impl.cc:1959: CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &rasterizer_, On 2014/12/23 18:54:29, hendrikw wrote: > On ...
5 years, 12 months ago (2014-12-23 19:08:25 UTC) #12
vmpstr
(just a quick response) https://codereview.chromium.org/820743002/diff/80001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/820743002/diff/80001/cc/trees/layer_tree_host_impl.cc#newcode1959 cc/trees/layer_tree_host_impl.cc:1959: CreateResourceAndTileTaskWorkerPool(&tile_task_worker_pool_, &rasterizer_, On 2014/12/23 19:08:25, ...
5 years, 12 months ago (2014-12-23 20:00:02 UTC) #13
hendrikw
On 2014/12/23 20:00:02, vmpstr wrote: > (just a quick response) > > https://codereview.chromium.org/820743002/diff/80001/cc/trees/layer_tree_host_impl.cc > File ...
5 years, 12 months ago (2014-12-23 22:42:39 UTC) #14
hendrikw
vmiura helped me hopefully address vmpstr's concern. PTAL
5 years, 12 months ago (2014-12-23 23:24:58 UTC) #15
vmiura
https://codereview.chromium.org/820743002/diff/260001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/820743002/diff/260001/cc/resources/tile_manager.cc#newcode458 cc/resources/tile_manager.cc:458: SynchronouslyRasterizeTiles(state); I think it would be better to put ...
5 years, 11 months ago (2014-12-29 22:58:10 UTC) #16
hendrikw
On 2014/12/29 22:58:10, vmiura wrote: > https://codereview.chromium.org/820743002/diff/260001/cc/resources/tile_manager.cc > File cc/resources/tile_manager.cc (right): > > https://codereview.chromium.org/820743002/diff/260001/cc/resources/tile_manager.cc#newcode458 > ...
5 years, 11 months ago (2014-12-29 23:28:19 UTC) #17
vmiura
LGTM for me, this'll work for the image prepare patch. Thanks! A few comments, in ...
5 years, 11 months ago (2014-12-30 22:24:38 UTC) #18
vmpstr
https://codereview.chromium.org/820743002/diff/320001/cc/resources/software_rasterizer.h File cc/resources/software_rasterizer.h (right): https://codereview.chromium.org/820743002/diff/320001/cc/resources/software_rasterizer.h#newcode15 cc/resources/software_rasterizer.h:15: class CC_EXPORT SoftwareRasterizer : public Rasterizer { Make a ...
5 years, 11 months ago (2014-12-30 22:55:23 UTC) #19
hendrikw
PTAL https://codereview.chromium.org/820743002/diff/300001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/820743002/diff/300001/cc/resources/gpu_rasterizer.cc#newcode66 cc/resources/gpu_rasterizer.cc:66: scoped_ptr<ScopedResource> resource = On 2014/12/30 22:24:38, vmiura wrote: ...
5 years, 11 months ago (2014-12-31 00:03:56 UTC) #20
vmpstr
Wouldn't this also rasterize all prepaint tiles (and pending tree tiles)? What happened to the ...
5 years, 11 months ago (2014-12-31 00:22:56 UTC) #21
hendrikw
On 2014/12/31 00:22:56, vmpstr wrote: > Wouldn't this also rasterize all prepaint tiles (and pending ...
5 years, 11 months ago (2014-12-31 00:31:04 UTC) #22
vmpstr
On 2014/12/31 00:31:04, hendrikw wrote: > On 2014/12/31 00:22:56, vmpstr wrote: > > Wouldn't this ...
5 years, 11 months ago (2014-12-31 00:31:41 UTC) #23
vmiura
On 2014/12/31 00:22:56, vmpstr wrote: > Wouldn't this also rasterize all prepaint tiles (and pending ...
5 years, 11 months ago (2014-12-31 00:48:22 UTC) #24
vmiura
> Although, we currently don't do any filtering, so I'm guessing it's the fact > ...
5 years, 11 months ago (2014-12-31 00:59:24 UTC) #25
vmpstr
On 2014/12/31 00:48:22, vmiura wrote: > On 2014/12/31 00:22:56, vmpstr wrote: > > Wouldn't this ...
5 years, 11 months ago (2014-12-31 01:05:59 UTC) #26
vmiura
> The difference is that we would schedule 32 tiles at a time, yielding to ...
5 years, 11 months ago (2014-12-31 01:27:05 UTC) #27
vmpstr
https://codereview.chromium.org/820743002/diff/360001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/820743002/diff/360001/cc/resources/gpu_rasterizer.cc#newcode65 cc/resources/gpu_rasterizer.cc:65: ResourceWriteLocks locks; nit: ScopedResourceWriteLocks https://codereview.chromium.org/820743002/diff/360001/cc/resources/gpu_rasterizer.cc#newcode68 cc/resources/gpu_rasterizer.cc:68: // TODO(hendrikw): Don't ...
5 years, 11 months ago (2015-01-02 17:43:22 UTC) #28
hendrikw
On 2015/01/02 17:43:22, vmpstr wrote: > https://codereview.chromium.org/820743002/diff/360001/cc/resources/gpu_rasterizer.cc > File cc/resources/gpu_rasterizer.cc (right): > > https://codereview.chromium.org/820743002/diff/360001/cc/resources/gpu_rasterizer.cc#newcode65 > ...
5 years, 11 months ago (2015-01-02 18:55:10 UTC) #29
vmpstr
lgtm from the point of view of correctness. I'm ok with landing this, with the ...
5 years, 11 months ago (2015-01-02 20:36:53 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/820743002/400001
5 years, 11 months ago (2015-01-02 20:38:42 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/46575)
5 years, 11 months ago (2015-01-02 20:49:08 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/820743002/420001
5 years, 11 months ago (2015-01-02 22:35:44 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/109214)
5 years, 11 months ago (2015-01-02 22:53:51 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/820743002/440001
5 years, 11 months ago (2015-01-02 23:31:37 UTC) #40
commit-bot: I haz the power
Committed patchset #23 (id:440001)
5 years, 11 months ago (2015-01-03 00:23:12 UTC) #41
commit-bot: I haz the power
5 years, 11 months ago (2015-01-03 00:24:06 UTC) #42
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/2f32e4ee3c21e0bd9ca26d7fa63cf14ed49d8a3b
Cr-Commit-Position: refs/heads/master@{#309866}

Powered by Google App Engine
This is Rietveld 408576698