| 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 84c43c20b1c3462b342036d0fbbc7311e9249e28..678440e31506440f8a67fefd218a097c99a1b16d 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -1096,6 +1096,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");
|
| @@ -1133,6 +1140,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()));
|
|
|