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

Unified Diff: sky/compositor/layer_host.cc

Issue 757643002: Add some trace events to Sky compositor (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/compositor/layer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/compositor/layer_host.cc
diff --git a/sky/compositor/layer_host.cc b/sky/compositor/layer_host.cc
index 9a635e6d4a211a3c1e06396ca47a1899f31509e6..404521434678d8a24cb148f85af3746631c72084 100644
--- a/sky/compositor/layer_host.cc
+++ b/sky/compositor/layer_host.cc
@@ -4,6 +4,7 @@
#include "sky/compositor/layer_host.h"
+#include "base/debug/trace_event.h"
#include "base/message_loop/message_loop.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/gpu/gl_context.h"
@@ -53,6 +54,9 @@ void LayerHost::ReturnResources(
void LayerHost::BeginFrame(base::TimeTicks frame_time,
base::TimeTicks deadline) {
+
+ TRACE_EVENT0("sky", "LayerHost::BeginFrame");
+
DCHECK_EQ(state_, kWaitingForBeginFrame);
state_ = kProducingFrame;
client_->BeginFrame(frame_time);
@@ -70,6 +74,8 @@ void LayerHost::BeginFrame(base::TimeTicks frame_time,
}
void LayerHost::Upload(Layer* layer) {
+ TRACE_EVENT0("sky", "LayerHost::Upload");
+
if (!surface_holder_.IsReadyForFrame()) {
if (state_ == kProducingFrame) {
// Currently we use a timer to drive the BeginFrame cycle, which means we
« no previous file with comments | « sky/compositor/layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698