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

Issue 11575018: cc: Add id->LayerImpl map to LayerTreeImpl (Closed)

Created:
8 years ago by enne (OOO)
Modified:
8 years ago
Reviewers:
danakj
CC:
chromium-reviews, cc-bugs_chromium.org, nduca
Visibility:
Public.

Description

cc: Add id->LayerImpl map to LayerTreeImpl This is a prerequisite to two LayerTreeImpls, as PictureLayerImpls in the active tree may need to ask about their pending tree sibilings with the same id. Once this lands, functionality like findScrollingLayerbyId can be wrapped into this too. LayerImpl now registers itself with its tree on creation and destruction. As there are now asserts that a given id is not already in use, a number of tests have been updated to not duplicate layer ids. There doesn't technically need to be an unregister step, but as LayerImpl doesn't necessarily have to be in the LayerImpl tree rooted in the LayerTreeImpl, this unregister check will blow up if anybody has a layer outliving their registered tree (which is bad). As LayerImpl has single ownership, it's impossible to assign the same non-NULL replica or mask to a layer, so the LayerImpl unit tests are updated to not test this anymore. Masks and replicas are also modified to keep their id in sync with their pointer during tree synchronization to prevent asserts about duplicate ids. R=danakj@chromium.org BUG=155209 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173110

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -24 lines) Patch
M cc/layer_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/layer_impl.cc View 3 chunks +26 lines, -10 lines 4 comments Download
M cc/layer_impl_unittest.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 2 chunks +8 lines, -8 lines 0 comments Download
M cc/layer_tree_impl.h View 3 chunks +21 lines, -0 lines 2 comments Download
M cc/layer_tree_impl.cc View 2 chunks +18 lines, -0 lines 0 comments Download
M cc/quad_culler_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M cc/render_surface_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/tree_synchronizer.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
enne (OOO)
8 years ago (2012-12-13 23:25:20 UTC) #1
danakj
LG mostly. https://codereview.chromium.org/11575018/diff/1/cc/layer_impl.cc File cc/layer_impl.cc (right): https://codereview.chromium.org/11575018/diff/1/cc/layer_impl.cc#newcode504 cc/layer_impl.cc:504: } else if (newLayerId == m_maskLayerId) This ...
8 years ago (2012-12-13 23:57:11 UTC) #2
enne (OOO)
https://codereview.chromium.org/11575018/diff/1/cc/layer_impl.cc File cc/layer_impl.cc (right): https://codereview.chromium.org/11575018/diff/1/cc/layer_impl.cc#newcode504 cc/layer_impl.cc:504: } else if (newLayerId == m_maskLayerId) On 2012/12/13 23:57:11, ...
8 years ago (2012-12-14 00:21:12 UTC) #3
danakj
LGTM! https://codereview.chromium.org/11575018/diff/1/cc/layer_impl.cc File cc/layer_impl.cc (right): https://codereview.chromium.org/11575018/diff/1/cc/layer_impl.cc#newcode504 cc/layer_impl.cc:504: } else if (newLayerId == m_maskLayerId) On 2012/12/14 ...
8 years ago (2012-12-14 00:23:15 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/11575018/1
8 years ago (2012-12-14 00:44:38 UTC) #5
commit-bot: I haz the power
8 years ago (2012-12-14 07:03:26 UTC) #6
Message was sent while issue was closed.
Change committed as 173110

Powered by Google App Engine
This is Rietveld 408576698