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 <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/atomic_sequence_num.h" | 11 #include "base/atomic_sequence_num.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/debug/trace_event.h" | |
15 #include "base/debug/trace_event_argument.h" | |
16 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
17 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
18 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
19 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
| 18 #include "base/trace_event/trace_event.h" |
| 19 #include "base/trace_event/trace_event_argument.h" |
20 #include "cc/animation/animation_registrar.h" | 20 #include "cc/animation/animation_registrar.h" |
21 #include "cc/animation/layer_animation_controller.h" | 21 #include "cc/animation/layer_animation_controller.h" |
22 #include "cc/base/math_util.h" | 22 #include "cc/base/math_util.h" |
23 #include "cc/debug/devtools_instrumentation.h" | 23 #include "cc/debug/devtools_instrumentation.h" |
24 #include "cc/debug/rendering_stats_instrumentation.h" | 24 #include "cc/debug/rendering_stats_instrumentation.h" |
25 #include "cc/input/layer_selection_bound.h" | 25 #include "cc/input/layer_selection_bound.h" |
26 #include "cc/input/page_scale_animation.h" | 26 #include "cc/input/page_scale_animation.h" |
27 #include "cc/input/top_controls_manager.h" | 27 #include "cc/input/top_controls_manager.h" |
28 #include "cc/layers/heads_up_display_layer.h" | 28 #include "cc/layers/heads_up_display_layer.h" |
29 #include "cc/layers/heads_up_display_layer_impl.h" | 29 #include "cc/layers/heads_up_display_layer_impl.h" |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 473 } |
474 | 474 |
475 void LayerTreeHost::FinishAllRendering() { | 475 void LayerTreeHost::FinishAllRendering() { |
476 proxy_->FinishAllRendering(); | 476 proxy_->FinishAllRendering(); |
477 } | 477 } |
478 | 478 |
479 void LayerTreeHost::SetDeferCommits(bool defer_commits) { | 479 void LayerTreeHost::SetDeferCommits(bool defer_commits) { |
480 proxy_->SetDeferCommits(defer_commits); | 480 proxy_->SetDeferCommits(defer_commits); |
481 } | 481 } |
482 | 482 |
483 void LayerTreeHost::DidDeferCommit() {} | |
484 | |
485 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { | 483 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { |
486 std::stack<Layer*> layer_stack; | 484 std::stack<Layer*> layer_stack; |
487 layer_stack.push(root_layer()); | 485 layer_stack.push(root_layer()); |
488 while (!layer_stack.empty()) { | 486 while (!layer_stack.empty()) { |
489 Layer* current_layer = layer_stack.top(); | 487 Layer* current_layer = layer_stack.top(); |
490 layer_stack.pop(); | 488 layer_stack.pop(); |
491 current_layer->SetNeedsDisplay(); | 489 current_layer->SetNeedsDisplay(); |
492 for (unsigned int i = 0; i < current_layer->children().size(); i++) { | 490 for (unsigned int i = 0; i < current_layer->children().size(); i++) { |
493 layer_stack.push(current_layer->child_at(i)); | 491 layer_stack.push(current_layer->child_at(i)); |
494 } | 492 } |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 bool children_need_begin_frames) const { | 1370 bool children_need_begin_frames) const { |
1373 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); | 1371 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); |
1374 } | 1372 } |
1375 | 1373 |
1376 void LayerTreeHost::SendBeginFramesToChildren( | 1374 void LayerTreeHost::SendBeginFramesToChildren( |
1377 const BeginFrameArgs& args) const { | 1375 const BeginFrameArgs& args) const { |
1378 client_->SendBeginFramesToChildren(args); | 1376 client_->SendBeginFramesToChildren(args); |
1379 } | 1377 } |
1380 | 1378 |
1381 } // namespace cc | 1379 } // namespace cc |
OLD | NEW |