diff options
author | vollick <vollick@chromium.org> | 2016-03-22 11:33:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-22 18:35:30 +0000 |
commit | 83fbfc832bb24abbea9c9dfa4ff17ad20bc047f4 (patch) | |
tree | fbb9da14d918cda98c34b7ae441a684a0293650a /cc/trees/layer_tree_host_common.cc | |
parent | b08686b8c95ece5c34b49904496fdaa06094c0ff (diff) | |
download | chromium_src-83fbfc832bb24abbea9c9dfa4ff17ad20bc047f4.zip chromium_src-83fbfc832bb24abbea9c9dfa4ff17ad20bc047f4.tar.gz chromium_src-83fbfc832bb24abbea9c9dfa4ff17ad20bc047f4.tar.bz2 |
Transfer LayerImpl ownership to LayerTreeImpl
I have taken a very simple strategy. I have
retained all LayerImpl functions related to
transfer of ownership (AddChild, etc). These now
update raw pointers on the LayerImpl as well as
updating true ownership by talking to the LTI.
This allows most unit test code to remain as is.
LayerImpl's may be constructed and ownership may
be transferred just as it had been.
BUG=594026
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1801853002
Cr-Commit-Position: refs/heads/master@{#382619}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r-- | cc/trees/layer_tree_host_common.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc index 83c9c75..77b327b 100644 --- a/cc/trees/layer_tree_host_common.cc +++ b/cc/trees/layer_tree_host_common.cc @@ -824,23 +824,23 @@ void CalculateRenderSurfaceLayerList( if (render_to_separate_surface) layer->render_surface()->SetAccumulatedContentRect(gfx::Rect()); - for (const auto& child_layer : layer->children()) { + for (auto* child_layer : layer->children()) { CalculateRenderSurfaceLayerList( - child_layer.get(), property_trees, render_surface_layer_list, - descendants, nearest_occlusion_immune_ancestor, layer_is_drawn, + child_layer, property_trees, render_surface_layer_list, descendants, + nearest_occlusion_immune_ancestor, layer_is_drawn, can_render_to_separate_surface, current_render_surface_layer_list_id, max_texture_size); // If the child is its own render target, then it has a render surface. - if (child_layer->render_target() == child_layer.get() && + if (child_layer->render_target() == child_layer && !child_layer->render_surface()->layer_list().empty() && !child_layer->render_surface()->content_rect().IsEmpty()) { // This child will contribute its render surface, which means // we need to mark just the mask layer (and replica mask layer) // with the id. MarkMasksWithRenderSurfaceLayerListId( - child_layer.get(), current_render_surface_layer_list_id); - descendants->push_back(child_layer.get()); + child_layer, current_render_surface_layer_list_id); + descendants->push_back(child_layer); } if (child_layer->layer_or_descendant_is_drawn()) { |