Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1053)

Unified Diff: cc/layers/layer.cc

Issue 61883006: Compositor thread plumbing for layout rectangle debug info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to scoped_refptr for interfaces. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 77907193b59a9c2ddd23ce2f3cf1c54c0b381acd..18cfeac7ba666f23897bfa56b76b220e358b3216 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 scoped_refptr<base::debug::ConvertableToTraceFormat>(NULL);
+}
+
+
void Layer::SetCompositingReasons(CompositingReasons reasons) {
compositing_reasons_ = reasons;
}
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_client.h » ('j') | ui/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698