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

Unified Diff: cc/layers/heads_up_display_layer.cc

Issue 16903005: Add layer name into frame viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase code Created 7 years, 5 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/heads_up_display_layer.cc
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index 92486cc851599a7b7a7b7bd7c4b3a741d4fd9dfa..e255d0d297308d653cb5ee08e7ff74debf6bd037 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -5,6 +5,7 @@
#include "cc/layers/heads_up_display_layer.h"
#include <algorithm>
+#include <string>
#include "base/debug/trace_event.h"
#include "cc/layers/heads_up_display_layer_impl.h"
@@ -30,6 +31,13 @@ void HeadsUpDisplayLayer::PrepareForCalculateDrawProperties(
gfx::Transform matrix;
matrix.MakeIdentity();
+ bool is_tracing;
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED("cc", &is_tracing);
+ if (is_tracing)
+ SetDebugName("Heads Up Display Layer");
+ else
+ SetDebugName(std::string());
+
if (layer_tree_host()->debug_state().ShowHudRects()) {
int max_texture_size =
layer_tree_host()->GetRendererCapabilities().max_texture_size;

Powered by Google App Engine
This is Rietveld 408576698