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

Issue 799463005: cc: Mirror LiveTilesRect and tiles between active and recycled trees. (Closed)

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

Description

cc: Mirror LiveTilesRect and tiles between active and recycled trees. When the live tiles rect changes on the active tiling, we also remove tiles on the recycled tiling to avoid unshared tiles in the recycle tree. But when a tile is created on the active tree, we should also share the tile to the recycle tree. Since we're creating tiles, we also need to update the live tiles rect so tiles do not exist outside of it. So now the live tiles rect is simply updated on both trees at once. This ensures that on the next commit, if the picture layer did not get any invalidations, and doesn't push properties, it still has all the tiles in its live tiles rect so we can do ready-to-activate checks correctly. Secondly, when activating, if any tiles were present on the pending tree but are not on the active tree (can happen due to missing recordings on the active tree), then share those tiles to the active tree during activation. This patch fixes DCHECKs occuring in PictureLayerTiling's CloneTilesAndPropertiesFrom() where the pending and active tiling were not ending up with the same number of tiles. R=enne, vmpstr BUG=387116 Committed: https://crrev.com/bd6d7bc43094d50c0ce3d785aa270b49efb5959a Cr-Commit-Position: refs/heads/master@{#308174}

Patch Set 1 #

Patch Set 2 : noswap-ltr: . #

Patch Set 3 : noswap-ltr: . #

Total comments: 3

Patch Set 4 : noswap-ltr: withtestforclone #

Patch Set 5 : noswap-ltr: . #

Patch Set 6 : noswap-ltr: mirror live tiles rect #

Total comments: 2

Patch Set 7 : noswap-ltr: withcheck #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -27 lines) Patch
M cc/layers/picture_layer_impl.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 1 chunk +60 lines, -0 lines 0 comments Download
M cc/resources/picture_layer_tiling.h View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M cc/resources/picture_layer_tiling.cc View 1 2 3 4 5 6 15 chunks +57 lines, -22 lines 7 comments Download
M cc/resources/picture_layer_tiling_set.cc View 1 chunk +3 lines, -1 line 0 comments Download
M cc/resources/picture_layer_tiling_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_picture.cc View 1 2 3 4 1 chunk +126 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (1 generated)
danakj
https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc#newcode223 cc/resources/picture_layer_tiling.cc:223: // Create any missing tiles from the |twin_tiling|. I ...
6 years ago (2014-12-11 23:38:08 UTC) #1
enne (OOO)
Do you feel like it's needless churn to create/remove things from the recycle tree? Like, ...
6 years ago (2014-12-11 23:53:26 UTC) #2
danakj
On Thu, Dec 11, 2014 at 3:53 PM, <enne@chromium.org> wrote: > Do you feel like ...
6 years ago (2014-12-12 17:14:26 UTC) #3
vmpstr
On 2014/12/12 17:14:26, danakj wrote: > On Thu, Dec 11, 2014 at 3:53 PM, <mailto:enne@chromium.org> ...
6 years ago (2014-12-12 17:59:40 UTC) #4
vmpstr
https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc#newcode164 cc/resources/picture_layer_tiling.cc:164: recycled_twin->tiles_[key] = tile; What happens if this tile is ...
6 years ago (2014-12-12 18:01:34 UTC) #5
danakj
On Fri, Dec 12, 2014 at 9:59 AM, <vmpstr@chromium.org> wrote: > On 2014/12/12 17:14:26, danakj ...
6 years ago (2014-12-12 18:01:35 UTC) #6
danakj
https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc#newcode164 cc/resources/picture_layer_tiling.cc:164: recycled_twin->tiles_[key] = tile; On 2014/12/12 18:01:34, vmpstr wrote: > ...
6 years ago (2014-12-12 18:02:48 UTC) #7
vmpstr
On 2014/12/12 18:02:48, danakj wrote: > https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc > File cc/resources/picture_layer_tiling.cc (right): > > https://codereview.chromium.org/799463005/diff/40001/cc/resources/picture_layer_tiling.cc#newcode164 > ...
6 years ago (2014-12-12 18:07:57 UTC) #8
danakj
On Fri, Dec 12, 2014 at 10:07 AM, <vmpstr@chromium.org> wrote: > On 2014/12/12 18:02:48, danakj ...
6 years ago (2014-12-12 18:11:02 UTC) #9
danakj
OK I've added a unit test for the change to PLT::CloneTilesAndPropertiesFrom(). I'll see about making ...
6 years ago (2014-12-12 18:46:41 UTC) #10
danakj
Updated for SetLTR
6 years ago (2014-12-12 19:19:15 UTC) #11
vmpstr
https://codereview.chromium.org/799463005/diff/100001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/100001/cc/resources/picture_layer_tiling.cc#newcode744 cc/resources/picture_layer_tiling.cc:744: for (auto it = tiles_.begin(); it != tiles_.end(); ++it) ...
6 years ago (2014-12-12 19:55:30 UTC) #12
danakj
PTAL https://codereview.chromium.org/799463005/diff/100001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/100001/cc/resources/picture_layer_tiling.cc#newcode744 cc/resources/picture_layer_tiling.cc:744: for (auto it = tiles_.begin(); it != tiles_.end(); ...
6 years ago (2014-12-12 20:04:48 UTC) #13
vmpstr
lgtm https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc#newcode742 cc/resources/picture_layer_tiling.cc:742: void PictureLayerTiling::VerifyLiveTilesRect(bool is_on_recycle_tree) const { hah, nice.
6 years ago (2014-12-12 20:10:32 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/799463005/120001
6 years ago (2014-12-12 20:55:06 UTC) #16
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years ago (2014-12-12 22:00:32 UTC) #17
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/bd6d7bc43094d50c0ce3d785aa270b49efb5959a Cr-Commit-Position: refs/heads/master@{#308174}
6 years ago (2014-12-12 22:02:21 UTC) #18
danakj
So https://code.google.com/p/chromium/issues/detail?id=442402#c5 points to this CL as causing a input latency regression. Most of this ...
5 years, 11 months ago (2014-12-30 16:44:58 UTC) #19
danakj
https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc#newcode224 cc/resources/picture_layer_tiling.cc:224: for (const auto& tile_map_pair : twin_tiling.tiles_) { On 2014/12/30 ...
5 years, 11 months ago (2014-12-30 16:46:28 UTC) #20
vmpstr
https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc#newcode224 cc/resources/picture_layer_tiling.cc:224: for (const auto& tile_map_pair : twin_tiling.tiles_) { On 2014/12/30 ...
5 years, 11 months ago (2014-12-30 17:16:55 UTC) #21
danakj
https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc#newcode224 cc/resources/picture_layer_tiling.cc:224: for (const auto& tile_map_pair : twin_tiling.tiles_) { On 2014/12/30 ...
5 years, 11 months ago (2014-12-30 17:20:47 UTC) #22
vmpstr
https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc File cc/resources/picture_layer_tiling.cc (right): https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc#newcode224 cc/resources/picture_layer_tiling.cc:224: for (const auto& tile_map_pair : twin_tiling.tiles_) { On 2014/12/30 ...
5 years, 11 months ago (2014-12-30 18:03:58 UTC) #23
danakj
On 2014/12/30 18:03:58, vmpstr wrote: > https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc > File cc/resources/picture_layer_tiling.cc (right): > > https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_layer_tiling.cc#newcode224 > ...
5 years, 11 months ago (2014-12-30 19:32:12 UTC) #24
vmpstr
5 years, 11 months ago (2014-12-30 19:33:39 UTC) #25
Message was sent while issue was closed.
On 2014/12/30 19:32:12, danakj wrote:
> On 2014/12/30 18:03:58, vmpstr wrote:
> >
>
https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_la...
> > File cc/resources/picture_layer_tiling.cc (right):
> > 
> >
>
https://codereview.chromium.org/799463005/diff/120001/cc/resources/picture_la...
> > cc/resources/picture_layer_tiling.cc:224: for (const auto& tile_map_pair :
> > twin_tiling.tiles_) {
> > On 2014/12/30 17:20:47, danakj wrote:
> > > On 2014/12/30 17:16:55, vmpstr wrote:
> > > > On 2014/12/30 16:46:28, danakj wrote:
> > > > > On 2014/12/30 16:44:58, danakj wrote:
> > > > > > 1 here: We walk all pending tiles, and if they are not shared,
create
> an
> > > > > active
> > > > > > tile that is shared.
> > > > > 
> > > > > Or maybe since we know the tile will be shared we should do this more
> > > cheaply,
> > > > > like how we create a tile for the recycled twin, without needing to
> > compare
> > > > > invalidation, scale rects, and such.
> > > > 
> > > > You mean when we're creating the pending tile, if it's not shared but
> should
> > > be,
> > > > we set it immediately on the active tree? That seems a bit messy, since
> it's
> > > > like a pre-activation activation since the raster source on that tile
has
> to
> > > be
> > > > the pending source... Alternatively we could somehow maintain a set of
> tile
> > > > indexes that should be created but are not due to client not creating
the
> > > tile.
> > > > 
> > > > Something like 
> > > > ... tile = client_->CreateTile(...)
> > > > if (tile) {
> > > >  ...
> > > > } else {
> > > >  want_but_dont_have_tile.insert(index);
> > > > }
> > > > 
> > > > Although I can already see that can be a major pain to maintain...
> > > 
> > > I mean like instead of
> > > 
> > > CreateTile(key, foo bar, twin, etc);
> > > 
> > > tile->set_shared(true);
> > > tiles_[key] = tile;
> > > 
> > > Avoids the math/virtuals in CreateTile. 
> > 
> > Oh I see, but still keep the loop here? That could work, although I'm not
sure
> > it will save enough.
> 
> Ya.. idk. Failing at running android perf test remotely for some reason. Will
> have to peek again next week probly.
> 
> Keeping a list of "tiles we created on the pending tree" to create on the
active
> tree later might be a way to resolve this also. I think that's what you were
> getting at? Is a good thought..

Yeah that might work. I'm just worried about it being a headache to do one thing
on the pending tree and another thing on the active tree in a lot of functions.
Whatever works I guess :)

Powered by Google App Engine
This is Rietveld 408576698