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

Unified Diff: sky/shell/ui/animator.cc

Issue 1025073003: Add more tracing to Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « sky/engine/core/script/dart_loader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/animator.cc
diff --git a/sky/shell/ui/animator.cc b/sky/shell/ui/animator.cc
index 0833259c65d5740b58d9ad1105a20381aa484637..7b7fe3caca0fd510bb2ebcac9ef958d782ce4f72 100644
--- a/sky/shell/ui/animator.cc
+++ b/sky/shell/ui/animator.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
+#include "base/trace_event/trace_event.h"
namespace sky {
namespace shell {
@@ -24,6 +25,8 @@ Animator::~Animator() {
void Animator::RequestFrame() {
if (engine_requested_frame_)
return;
+
+ TRACE_EVENT_ASYNC_BEGIN0("sky", "Frame request pending", this);
engine_requested_frame_ = true;
if (!frame_in_progress_) {
@@ -45,7 +48,9 @@ void Animator::BeginFrame() {
frame_in_progress_ = false;
return;
}
+
engine_requested_frame_ = false;
+ TRACE_EVENT_ASYNC_END0("sky", "Frame request pending", this);
engine_->BeginFrame(base::TimeTicks::Now());
config_.gpu_task_runner->PostTaskAndReply(
« no previous file with comments | « sky/engine/core/script/dart_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698