| Index: cc/trees/layer_tree_host_impl.cc
|
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
| index 0dc624d6c4100253af4b363abb2375a00529a3dd..ef2b53dcc00a6cb2bbbf6d8d38bfd3307cfa55c8 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -1107,6 +1107,13 @@ bool LayerTreeHostImpl::AllowPartialSwap() const {
|
| return !debug_state_.ShowHudRects();
|
| }
|
|
|
| +class DidBeginTracingFunctor {
|
| + public:
|
| + void operator()(LayerImpl* layer) {
|
| + layer->DidBeginTracing();
|
| + }
|
| +};
|
| +
|
| void LayerTreeHostImpl::DrawLayers(FrameData* frame,
|
| base::TimeTicks frame_begin_time) {
|
| TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers");
|
| @@ -1144,6 +1151,18 @@ void LayerTreeHostImpl::DrawLayers(FrameData* frame,
|
| paint_time_counter_->SavePaintTime(stats.total_paint_time);
|
| }
|
|
|
| + bool is_new_trace;
|
| + TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
|
| + if (is_new_trace) {
|
| + if (pending_tree_)
|
| + LayerTreeHostCommon::CallFunctionForSubtree<
|
| + DidBeginTracingFunctor, LayerImpl>(
|
| + pending_tree_->root_layer());
|
| + LayerTreeHostCommon::CallFunctionForSubtree<
|
| + DidBeginTracingFunctor, LayerImpl>(
|
| + active_tree_->root_layer());
|
| + }
|
| +
|
| TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
|
| TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", this,
|
| TracedValue::FromValue(AsValue().release()));
|
|
|