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

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed)

Created:
4 years, 5 months ago by xingliu
Modified:
4 years, 4 months ago
Reviewers:
danakj, ajuma, vmpstr, Khushal
CC:
chromium-reviews, cc-bugs_chromium.org, David Trainor- moved to gerrit
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set up a LayerTree class to split the LayerTreeHost. The LayerTree class is the main thread counter-part to the LayerTreeImpl, which will own the root layer and other tree state. Data and functionality will be incrementally moved to this class as we eliminate dependencies of internal cc class and the embedder to LayerTree from the host. This patch moves the Registration/Unregistration logic for maintaining a map of layers tied to a host and tracking of dirty layers that need to push properties in the next commit, to the LayerTree. BUG=628683 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/e43518a18ef7736ece1beadde0c7e57e5ed7dd88 Cr-Commit-Position: refs/heads/master@{#408518}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Refactor layer registeration to LayerTree. #

Patch Set 3 : Remove external access to layer_id_map_ in LayerTree. #

Total comments: 9

Patch Set 4 : Fix based on review. #

Total comments: 1

Patch Set 5 : Fix merge conflict, also change func name for testing only function. #

Patch Set 6 : Use friend class for test code, or we need hundreds of SetSomethingForTest functions in future refa… #

Total comments: 1

Patch Set 7 : add proto to gyp file and modify inproper comment. #

Total comments: 13

Patch Set 8 : Rebase master #

Patch Set 9 : Fix based on code review. #

Patch Set 10 : Layer GetLayerTree now directly uses LayerTree pointer. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+587 lines, -418 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/cc.gyp View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M cc/layers/layer.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M cc/layers/layer.cc View 1 2 3 4 5 6 7 8 9 10 chunks +22 lines, -12 lines 0 comments Download
M cc/layers/layer_proto_converter.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layers/layer_proto_converter_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +30 lines, -40 lines 0 comments Download
M cc/layers/layer_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +52 lines, -50 lines 0 comments Download
M cc/layers/picture_layer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/proto/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A + cc/proto/layer_tree.proto View 1 1 chunk +4 lines, -5 lines 3 comments Download
M cc/proto/layer_tree_host.proto View 1 2 chunks +17 lines, -17 lines 0 comments Download
M cc/test/fake_layer_tree_host.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
A cc/trees/layer_tree.h View 1 2 3 4 5 6 7 8 1 chunk +68 lines, -0 lines 0 comments Download
A cc/trees/layer_tree.cc View 1 2 3 4 5 1 chunk +89 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 7 6 chunks +8 lines, -20 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 20 chunks +37 lines, -81 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 19 chunks +218 lines, -169 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_serialization.cc View 1 2 3 4 5 6 7 5 chunks +14 lines, -9 lines 0 comments Download
M cc/trees/tree_synchronizer.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M cc/trees/tree_synchronizer.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M cc/trees/tree_synchronizer_unittest.cc View 1 2 3 4 5 6 7 8 6 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 100 (76 generated)
xingliu
Refactor two functions into LayerTree.
4 years, 5 months ago (2016-07-16 02:36:31 UTC) #3
Khushal
Looks good xing! https://codereview.chromium.org/2159513003/diff/1/cc/BUILD.gn File cc/BUILD.gn (right): https://codereview.chromium.org/2159513003/diff/1/cc/BUILD.gn#newcode498 cc/BUILD.gn:498: "trees/layer_tree.cc", This will need a gyp ...
4 years, 5 months ago (2016-07-18 16:59:33 UTC) #8
xingliu
Refactored more functions. https://codereview.chromium.org/2159513003/diff/1/cc/BUILD.gn File cc/BUILD.gn (right): https://codereview.chromium.org/2159513003/diff/1/cc/BUILD.gn#newcode498 cc/BUILD.gn:498: "trees/layer_tree.cc", On 2016/07/18 16:59:32, Khushal wrote: ...
4 years, 5 months ago (2016-07-19 22:47:38 UTC) #11
Khushal
+vmpstr for a general review. +ajuma for AnimationHost ownership. There was a discussion in the ...
4 years, 5 months ago (2016-07-20 00:46:52 UTC) #17
Khushal
Also could you update the Cl description. Something along the lines of, Set up a ...
4 years, 5 months ago (2016-07-20 00:55:58 UTC) #18
ajuma
On 2016/07/20 00:46:52, Khushal wrote: > +vmpstr for a general review. > > +ajuma for ...
4 years, 5 months ago (2016-07-20 15:35:01 UTC) #20
Khushal
On 2016/07/20 15:35:01, ajuma wrote: > On 2016/07/20 00:46:52, Khushal wrote: > > +vmpstr for ...
4 years, 5 months ago (2016-07-20 18:56:02 UTC) #21
ajuma
On 2016/07/20 18:56:02, Khushal wrote: > On 2016/07/20 15:35:01, ajuma wrote: > > On 2016/07/20 ...
4 years, 5 months ago (2016-07-20 20:30:22 UTC) #22
xingliu
Fixed a couple of issues based on code review. https://codereview.chromium.org/2159513003/diff/40001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2159513003/diff/40001/cc/trees/layer_tree_host.cc#newcode253 cc/trees/layer_tree_host.cc:253: ...
4 years, 5 months ago (2016-07-20 20:33:07 UTC) #25
Khushal
https://codereview.chromium.org/2159513003/diff/40001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2159513003/diff/40001/cc/trees/layer_tree_host.cc#newcode253 cc/trees/layer_tree_host.cc:253: layer_tree_(&(params->animation_host)) { On 2016/07/20 20:33:06, xingliu wrote: > On ...
4 years, 5 months ago (2016-07-20 21:29:48 UTC) #32
Khushal
lgtm. Thanks! https://codereview.chromium.org/2159513003/diff/100001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2159513003/diff/100001/cc/trees/layer_tree_host.cc#newcode1494 cc/trees/layer_tree_host.cc:1494: // Serialize LayerTree before LayerTree.layers_that_should_push_properties_ You probably ...
4 years, 5 months ago (2016-07-20 23:14:10 UTC) #37
xingliu
On 2016/07/20 23:14:10, Khushal wrote: > lgtm. Thanks! > > https://codereview.chromium.org/2159513003/diff/100001/cc/trees/layer_tree_host.cc > File cc/trees/layer_tree_host.cc (right): ...
4 years, 5 months ago (2016-07-22 17:15:28 UTC) #42
xingliu
On 2016/07/22 17:15:28, xingliu wrote: > On 2016/07/20 23:14:10, Khushal wrote: > > lgtm. Thanks! ...
4 years, 5 months ago (2016-07-25 15:50:43 UTC) #43
vmpstr
https://codereview.chromium.org/2159513003/diff/120001/cc/layers/layer.cc File cc/layers/layer.cc (right): https://codereview.chromium.org/2159513003/diff/120001/cc/layers/layer.cc#newcode1854 cc/layers/layer.cc:1854: return layer_tree_host_ ? layer_tree_host_->GetLayerTree() : nullptr; If we're mimicking ...
4 years, 5 months ago (2016-07-25 20:45:46 UTC) #44
xingliu
https://codereview.chromium.org/2159513003/diff/120001/cc/layers/layer.cc File cc/layers/layer.cc (right): https://codereview.chromium.org/2159513003/diff/120001/cc/layers/layer.cc#newcode1854 cc/layers/layer.cc:1854: return layer_tree_host_ ? layer_tree_host_->GetLayerTree() : nullptr; On 2016/07/25 20:45:46, ...
4 years, 5 months ago (2016-07-25 23:40:25 UTC) #45
Khushal
https://codereview.chromium.org/2159513003/diff/120001/cc/layers/layer.cc File cc/layers/layer.cc (right): https://codereview.chromium.org/2159513003/diff/120001/cc/layers/layer.cc#newcode1854 cc/layers/layer.cc:1854: return layer_tree_host_ ? layer_tree_host_->GetLayerTree() : nullptr; On 2016/07/25 20:45:46, ...
4 years, 4 months ago (2016-07-26 18:10:42 UTC) #46
vmpstr
In some places where you have root->layer_tree_host()->GetLayerTree(), can that be changed to root->GetLayerTree()? Also, my ...
4 years, 4 months ago (2016-07-27 18:05:30 UTC) #48
xingliu
Fix couple of issues according to codereview. Mainly includes: 1. Now layer hold pointer of ...
4 years, 4 months ago (2016-07-28 16:10:24 UTC) #61
vmpstr
lgtm https://codereview.chromium.org/2159513003/diff/180001/cc/proto/layer_tree.proto File cc/proto/layer_tree.proto (right): https://codereview.chromium.org/2159513003/diff/180001/cc/proto/layer_tree.proto#newcode12 cc/proto/layer_tree.proto:12: repeated int32 layers_that_should_push_properties = 1; Maybe we should ...
4 years, 4 months ago (2016-07-28 21:43:22 UTC) #91
Khushal
https://codereview.chromium.org/2159513003/diff/180001/cc/proto/layer_tree.proto File cc/proto/layer_tree.proto (right): https://codereview.chromium.org/2159513003/diff/180001/cc/proto/layer_tree.proto#newcode13 cc/proto/layer_tree.proto:13: optional bool in_paint_layer_contents = 2; On 2016/07/28 21:43:22, vmpstr ...
4 years, 4 months ago (2016-07-28 21:52:20 UTC) #92
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2159513003/180001
4 years, 4 months ago (2016-07-28 23:03:17 UTC) #95
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 4 months ago (2016-07-29 00:00:04 UTC) #97
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/e43518a18ef7736ece1beadde0c7e57e5ed7dd88 Cr-Commit-Position: refs/heads/master@{#408518}
4 years, 4 months ago (2016-07-29 00:02:13 UTC) #99
xingliu
4 years, 4 months ago (2016-07-30 03:00:48 UTC) #100
Message was sent while issue was closed.
Thanks all for the review!

Powered by Google App Engine
This is Rietveld 408576698