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

Issue 676953003: cc: Always keep the PictureLayerImpl::twin_layer_ pointer valid. (Closed)

Created:
6 years, 1 month ago by danakj
Modified:
6 years, 1 month ago
Reviewers:
vmpstr, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

cc: Always keep the PictureLayerImpl::twin_layer_ pointer valid. We currently null the twin_layer_ pointer when pushing to the active tree and then using hashmap lookups to find the recycled twin, and reconnecting the pointers in DoPostCommitInitializationIfNeeded(). Instead, we can leave the pointers always valid and use Getter methods that check what tree the twin is on to decide if we should consider it a pending twin or a recycle twin. This means that during commit the pending layer will be able to find its active twin when it updates its picture pile, so that it can share tiles that are not invalidated. (Previously it wouldn't know about its twin until after commit, when we set it up and then did SyncTilings.) This allows us to have a more straightforward flow of data, setting up the pending tilings when we give it a pile from the main thread instead of doing it at some hazy future time (usually inside UpdateDrawProperties). R=enne, vmpstr BUG=407418, 387116, 427213 Committed: https://crrev.com/11f13546fd3ee3d53921c23861bf970bd2bb6428 Cr-Commit-Position: refs/heads/master@{#301155} Committed: https://crrev.com/7b08e2869cf7f6a93503ffe66998244ea66b55e7 Cr-Commit-Position: refs/heads/master@{#301432}

Patch Set 1 #

Patch Set 2 : twins: . #

Total comments: 8

Patch Set 3 : twins: comment-and-gettwintiling-rename #

Patch Set 4 : twins: add-test-case #

Total comments: 2

Patch Set 5 : twins: swap #

Patch Set 6 : twins: rebase #

Patch Set 7 : twins: fixcrash #

Patch Set 8 : twins: rebase #

Patch Set 9 : twins: synctilingscrash #

Patch Set 10 : twins: anothercheck #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -111 lines) Patch
M cc/debug/rasterize_and_record_benchmark_impl.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layers/picture_layer_impl.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 chunks +48 lines, -28 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 7 7 chunks +51 lines, -14 lines 0 comments Download
M cc/resources/picture_layer_tiling.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/picture_layer_tiling.cc View 1 2 3 4 5 6 7 5 chunks +10 lines, -5 lines 0 comments Download
M cc/resources/tile_manager_unittest.cc View 1 2 1 chunk +16 lines, -5 lines 0 comments Download
M cc/test/fake_picture_layer_impl.h View 1 chunk +1 line, -2 lines 0 comments Download
M cc/test/fake_picture_layer_impl.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M cc/test/fake_picture_layer_tiling_client.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_picture_layer_tiling_client.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 2 chunks +1 line, -7 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 2 chunks +45 lines, -27 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_picture.cc View 2 chunks +13 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 32 (11 generated)
danakj
6 years, 1 month ago (2014-10-24 16:10:30 UTC) #1
vmpstr
https://codereview.chromium.org/676953003/diff/20001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/676953003/diff/20001/cc/layers/picture_layer_impl.cc#newcode118 cc/layers/picture_layer_impl.cc:118: twin_layer_ = layer_impl; Can you make a comment here ...
6 years, 1 month ago (2014-10-24 16:47:05 UTC) #2
danakj
https://codereview.chromium.org/676953003/diff/20001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/676953003/diff/20001/cc/layers/picture_layer_impl.cc#newcode118 cc/layers/picture_layer_impl.cc:118: twin_layer_ = layer_impl; On 2014/10/24 16:47:05, vmpstr wrote: > ...
6 years, 1 month ago (2014-10-24 16:53:30 UTC) #3
danakj
Test added PTAL
6 years, 1 month ago (2014-10-24 17:06:54 UTC) #4
vmpstr
lgtm, thanks. https://codereview.chromium.org/676953003/diff/60001/cc/trees/layer_tree_host_impl_unittest.cc File cc/trees/layer_tree_host_impl_unittest.cc (right): https://codereview.chromium.org/676953003/diff/60001/cc/trees/layer_tree_host_impl_unittest.cc#newcode7498 cc/trees/layer_tree_host_impl_unittest.cc:7498: PictureLayerImpl::Pair p = layer_pairs[1]; std::swap!
6 years, 1 month ago (2014-10-24 17:20:10 UTC) #5
danakj
https://codereview.chromium.org/676953003/diff/60001/cc/trees/layer_tree_host_impl_unittest.cc File cc/trees/layer_tree_host_impl_unittest.cc (right): https://codereview.chromium.org/676953003/diff/60001/cc/trees/layer_tree_host_impl_unittest.cc#newcode7498 cc/trees/layer_tree_host_impl_unittest.cc:7498: PictureLayerImpl::Pair p = layer_pairs[1]; On 2014/10/24 17:20:10, vmpstr wrote: ...
6 years, 1 month ago (2014-10-24 18:00:25 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676953003/80001
6 years, 1 month ago (2014-10-24 18:01:01 UTC) #8
enne (OOO)
lgtm! This is a really nice cleanup.
6 years, 1 month ago (2014-10-24 18:39:06 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 1 month ago (2014-10-24 18:50:55 UTC) #10
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/11f13546fd3ee3d53921c23861bf970bd2bb6428 Cr-Commit-Position: refs/heads/master@{#301155}
6 years, 1 month ago (2014-10-24 18:51:40 UTC) #11
pdr.
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/680793002/ by pdr@chromium.org. ...
6 years, 1 month ago (2014-10-25 22:02:47 UTC) #12
danakj
I think the crash is that now you can have a twin immediately after commit, ...
6 years, 1 month ago (2014-10-27 14:51:42 UTC) #13
danakj
Oh, studying the crash stack a bit more I think what I said is wrong ...
6 years, 1 month ago (2014-10-27 14:54:42 UTC) #14
danakj
On 2014/10/27 14:54:42, danakj wrote: > Oh, studying the crash stack a bit more I ...
6 years, 1 month ago (2014-10-27 15:47:43 UTC) #15
danakj
On 2014/10/27 15:47:43, danakj wrote: > On 2014/10/27 14:54:42, danakj wrote: > > Oh, studying ...
6 years, 1 month ago (2014-10-27 16:08:16 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676953003/160001
6 years, 1 month ago (2014-10-27 18:19:24 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676953003/160001
6 years, 1 month ago (2014-10-27 18:23:52 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676953003/180001
6 years, 1 month ago (2014-10-27 19:24:56 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676953003/200001
6 years, 1 month ago (2014-10-27 19:33:33 UTC) #30
commit-bot: I haz the power
Committed patchset #10 (id:200001)
6 years, 1 month ago (2014-10-27 20:30:09 UTC) #31
commit-bot: I haz the power
6 years, 1 month ago (2014-10-27 20:30:46 UTC) #32
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/7b08e2869cf7f6a93503ffe66998244ea66b55e7
Cr-Commit-Position: refs/heads/master@{#301432}

Powered by Google App Engine
This is Rietveld 408576698