Descriptioncc: 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
Messages
Total messages: 6 (0 generated)
|