Index: cc/layers/layer.cc |
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
index 77907193b59a9c2ddd23ce2f3cf1c54c0b381acd..e804883e87be14f84cb6ebf027ff502634458616 100644 |
--- a/cc/layers/layer.cc |
+++ b/cc/layers/layer.cc |
@@ -873,10 +873,12 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { |
bool is_tracing; |
TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("cc.debug"), |
&is_tracing); |
- if (is_tracing) |
- layer->SetDebugName(DebugName()); |
- else |
- layer->SetDebugName(std::string()); |
+ if (is_tracing) { |
+ layer->SetDebugName(DebugName()); |
+ layer->SetDebugInfo(TakeDebugInfo()); |
+ } else { |
+ layer->SetDebugName(std::string()); |
+ } |
layer->SetCompositingReasons(compositing_reasons_); |
layer->SetDoubleSided(double_sided_); |
@@ -1034,6 +1036,14 @@ std::string Layer::DebugName() { |
return client_ ? client_->DebugName() : std::string(); |
} |
+scoped_refptr<base::debug::ConvertableToTraceFormat> Layer::TakeDebugInfo() { |
+ if (client_) |
+ return client_->TakeDebugInfo(); |
+ else |
+ return NULL; |
+} |
+ |
+ |
void Layer::SetCompositingReasons(CompositingReasons reasons) { |
compositing_reasons_ = reasons; |
} |