| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |