| Index: cc/trees/layer_tree_impl.h
|
| diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
|
| index b6776ceab0a1e5fddb7930719d3efcfeca754a60..ce681465574c7dd778935e1719d5c8e4c2bd3626 100644
|
| --- a/cc/trees/layer_tree_impl.h
|
| +++ b/cc/trees/layer_tree_impl.h
|
| @@ -130,9 +130,10 @@ class CC_EXPORT LayerTreeImpl {
|
|
|
| // Other public methods
|
| // ---------------------------------------------------------------------------
|
| - LayerImpl* root_layer() const { return root_layer_.get(); }
|
| + LayerImpl* root_layer() const { return root_layer_; }
|
| void SetRootLayer(scoped_ptr<LayerImpl>);
|
| - scoped_ptr<LayerImpl> DetachLayerTree();
|
| + scoped_ptr<OwnedLayerImplList> DetachLayers();
|
| + void ClearLayers();
|
|
|
| void SetPropertyTrees(const PropertyTrees property_trees) {
|
| property_trees_ = property_trees;
|
| @@ -307,6 +308,10 @@ class CC_EXPORT LayerTreeImpl {
|
| void RegisterLayer(LayerImpl* layer);
|
| void UnregisterLayer(LayerImpl* layer);
|
|
|
| + // These manage ownership of the LayerImpl.
|
| + void AddLayer(scoped_ptr<LayerImpl> layer);
|
| + scoped_ptr<LayerImpl> RemoveLayer(int id);
|
| +
|
| size_t NumLayers();
|
|
|
| void DidBecomeActive();
|
| @@ -496,7 +501,7 @@ class CC_EXPORT LayerTreeImpl {
|
| LayerTreeHostImpl* layer_tree_host_impl_;
|
| int source_frame_number_;
|
| int is_first_frame_after_commit_tracker_;
|
| - scoped_ptr<LayerImpl> root_layer_;
|
| + LayerImpl* root_layer_;
|
| HeadsUpDisplayLayerImpl* hud_layer_;
|
| PropertyTrees property_trees_;
|
| SkColor background_color_;
|
| @@ -519,8 +524,8 @@ class CC_EXPORT LayerTreeImpl {
|
|
|
| scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_;
|
|
|
| - using LayerIdMap = std::unordered_map<int, LayerImpl*>;
|
| - LayerIdMap layer_id_map_;
|
| + scoped_ptr<OwnedLayerImplList> layers_;
|
| + LayerImplMap layer_id_map_;
|
| // Set of layers that need to push properties.
|
| std::unordered_set<LayerImpl*> layers_that_should_push_properties_;
|
|
|
|
|