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

Unified Diff: cc/layers/layer.cc

Issue 16903005: Add layer name into frame viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pulling name when tracing Created 7 years, 6 months 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 bdcbc755d15db112782d34e3623ca2b07bd58c53..eb48becbd26d53623acb6f535bd27527961ec26e 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/debug/trace_event.h"
#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/single_thread_task_runner.h"
@@ -675,7 +676,15 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetBounds(paint_properties_.bounds);
layer->SetContentBounds(content_bounds());
layer->SetContentsScale(contents_scale_x(), contents_scale_y());
- layer->SetDebugName(debug_name_);
+
+ bool pulling_debug_name;
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
enne (OOO) 2013/07/09 20:15:32 Please remove the disabled by default here. Also,
qiankun 2013/07/10 04:53:07 Done.
enne (OOO) 2013/07/10 16:48:42 Yeah, that's exactly it. Rather than pulling the
qiankun 2013/07/11 10:04:43 Done.
+ &pulling_debug_name);
+ if (pulling_debug_name)
+ layer->SetDebugName(DebugName());
+ else
+ layer->SetDebugName(debug_name_);
enne (OOO) 2013/07/09 20:15:32 What about clearing the name if tracing is off?
qiankun 2013/07/10 04:53:07 Ok.
+
layer->SetCompositingReasons(compositing_reasons_);
layer->SetDoubleSided(double_sided_);
layer->SetDrawCheckerboardForMissingTiles(
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.cc » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698