| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index 12773a140768d377b53eb6ff638020191bcae47c..be2d085d7c98e9ac34912bf055aa3e8b00add08f 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -18,6 +18,7 @@
|
| #include "cc/animation/keyframed_animation_curve.h"
|
| #include "cc/animation/layer_animation_controller.h"
|
| #include "cc/base/simple_enclosed_region.h"
|
| +#include "cc/debug/frame_viewer_instrumentation.h"
|
| #include "cc/layers/layer_client.h"
|
| #include "cc/layers/layer_impl.h"
|
| #include "cc/layers/scrollbar_layer_interface.h"
|
| @@ -897,12 +898,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
|
| layer->SetContentBounds(content_bounds());
|
| layer->SetContentsScale(contents_scale_x(), contents_scale_y());
|
|
|
| - bool is_tracing;
|
| - TRACE_EVENT_CATEGORY_GROUP_ENABLED(
|
| - TRACE_DISABLED_BY_DEFAULT("cc.debug") "," TRACE_DISABLED_BY_DEFAULT(
|
| - "devtools.timeline.layers"),
|
| - &is_tracing);
|
| - if (is_tracing)
|
| + if (frame_viewer_instrumentation::IsTracingLayerTreeSnapshots())
|
| layer->SetDebugInfo(TakeDebugInfo());
|
|
|
| layer->SetDoubleSided(double_sided_);
|
| @@ -1354,4 +1350,12 @@ void Layer::SetFrameTimingRequests(
|
| SetNeedsCommit();
|
| }
|
|
|
| +void Layer::DidBeginTracing() {
|
| + // We'll be dumping layer trees as part of trace, so make sure
|
| + // PushPropertiesTo() propagates layer debug info to the impl
|
| + // side -- otherwise this won't happen for the the layers that
|
| + // remain unchanged since tracing started.
|
| + SetNeedsPushProperties();
|
| +}
|
| +
|
| } // namespace cc
|
|
|