Chromium Code Reviews| Index: cc/trees/layer_tree_host.cc |
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
| index 2ac7ebe5b413b97a3b82e1f3cffb58d0e5a213ce..ea9cd0bdaa6e5bdf6c8dc0ad9dec3ddc969e5a7c 100644 |
| --- a/cc/trees/layer_tree_host.cc |
| +++ b/cc/trees/layer_tree_host.cc |
| @@ -21,6 +21,7 @@ |
| #include "cc/animation/layer_animation_controller.h" |
| #include "cc/base/math_util.h" |
| #include "cc/debug/devtools_instrumentation.h" |
| +#include "cc/debug/frame_viewer_instrumentation.h" |
| #include "cc/debug/rendering_stats_instrumentation.h" |
| #include "cc/input/layer_selection_bound.h" |
| #include "cc/input/page_scale_animation.h" |
| @@ -294,6 +295,14 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { |
| sync_tree->set_source_frame_number(source_frame_number()); |
| + bool is_new_trace; |
|
danakj
2015/03/16 19:06:49
Can you move this up above the |sync_tree| variabl
|
| + TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); |
| + if (is_new_trace && |
| + frame_viewer_instrumentation::IsTracingLayerTreeSnapshots()) { |
| + LayerTreeHostCommon::CallFunctionForSubtree( |
| + root_layer(), [](Layer* layer) { layer->DidBeginTracing(); }); |
| + } |
| + |
| if (needs_full_tree_sync_) { |
| sync_tree->SetRootLayer(TreeSynchronizer::SynchronizeTrees( |
| root_layer(), sync_tree->DetachLayerTree(), sync_tree)); |