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

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: Added TODO, fixed nits. 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
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698