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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 LayerTreeImpl* sync_tree = host_impl->sync_tree(); 365 LayerTreeImpl* sync_tree = host_impl->sync_tree();
366 366
367 if (next_commit_forces_redraw_) { 367 if (next_commit_forces_redraw_) {
368 sync_tree->ForceRedrawNextActivation(); 368 sync_tree->ForceRedrawNextActivation();
369 next_commit_forces_redraw_ = false; 369 next_commit_forces_redraw_ = false;
370 } 370 }
371 371
372 sync_tree->set_source_frame_number(source_frame_number()); 372 sync_tree->set_source_frame_number(source_frame_number());
373 373
374 if (needs_full_tree_sync_) { 374 if (needs_full_tree_sync_)
375 sync_tree->SetRootLayer(TreeSynchronizer::SynchronizeTrees( 375 TreeSynchronizer::SynchronizeTrees(root_layer(), sync_tree);
376 root_layer(), sync_tree->DetachLayerTree(), sync_tree)); 376
377 }
378 sync_tree->set_needs_full_tree_sync(needs_full_tree_sync_); 377 sync_tree->set_needs_full_tree_sync(needs_full_tree_sync_);
379 needs_full_tree_sync_ = false; 378 needs_full_tree_sync_ = false;
380 379
381 if (hud_layer_.get()) { 380 if (hud_layer_.get()) {
382 LayerImpl* hud_impl = LayerTreeHostCommon::FindLayerInSubtree( 381 LayerImpl* hud_impl = LayerTreeHostCommon::FindLayerInSubtree(
383 sync_tree->root_layer(), hud_layer_->id()); 382 sync_tree->root_layer(), hud_layer_->id());
384 sync_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(hud_impl)); 383 sync_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(hud_impl));
385 } else { 384 } else {
386 sync_tree->set_hud_layer(NULL); 385 sync_tree->set_hud_layer(NULL);
387 } 386 }
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 LayerTreeHostCommon::CallFunctionForSubtree( 1576 LayerTreeHostCommon::CallFunctionForSubtree(
1578 root_layer(), [seq_num](Layer* layer) { 1577 root_layer(), [seq_num](Layer* layer) {
1579 layer->set_property_tree_sequence_number(seq_num); 1578 layer->set_property_tree_sequence_number(seq_num);
1580 }); 1579 });
1581 1580
1582 surface_id_namespace_ = proto.surface_id_namespace(); 1581 surface_id_namespace_ = proto.surface_id_namespace();
1583 next_surface_sequence_ = proto.next_surface_sequence(); 1582 next_surface_sequence_ = proto.next_surface_sequence();
1584 } 1583 }
1585 1584
1586 } // namespace cc 1585 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698