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

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

Issue 1027913002: Add more trace events 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/shell/gpu/rasterizer.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/engine.cc
diff --git a/sky/shell/ui/engine.cc b/sky/shell/ui/engine.cc
index 80d2463425c0d4caf4fa60c6e2b331cfcb401f75..7f906a166899b51b5303f2318e008e2351d0f906 100644
--- a/sky/shell/ui/engine.cc
+++ b/sky/shell/ui/engine.cc
@@ -5,6 +5,7 @@
#include "sky/shell/ui/engine.h"
#include "base/bind.h"
+#include "base/trace_event/trace_event.h"
#include "mojo/public/cpp/application/connect.h"
#include "sky/engine/public/platform/WebInputEvent.h"
#include "sky/engine/public/web/Sky.h"
@@ -61,6 +62,8 @@ mojo::ServiceProviderPtr Engine::CreateServiceProvider() {
}
void Engine::Init() {
+ TRACE_EVENT0("sky", "Engine::Init");
+
service_provider_ = CreateServiceProvider();
mojo::NetworkServicePtr network_service;
mojo::ConnectToService(service_provider_.get(), &network_service);
@@ -70,6 +73,8 @@ void Engine::Init() {
}
void Engine::BeginFrame(base::TimeTicks frame_time) {
+ TRACE_EVENT0("sky", "Engine::BeginFrame");
+
double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF();
double deadline_sec = frame_time_sec;
double interval_sec = 1.0 / 60;
@@ -80,6 +85,8 @@ void Engine::BeginFrame(base::TimeTicks frame_time) {
}
skia::RefPtr<SkPicture> Engine::Paint() {
+ TRACE_EVENT0("sky", "Engine::Paint");
+
SkRTreeFactory factory;
SkPictureRecorder recorder;
auto canvas = skia::SharePtr(recorder.beginRecording(
@@ -137,6 +144,7 @@ blink::WebScreenInfo Engine::screenInfo() {
}
void Engine::OnInputEvent(InputEventPtr event) {
+ TRACE_EVENT0("sky", "Engine::OnInputEvent");
scoped_ptr<blink::WebInputEvent> web_event =
ConvertEvent(event, device_pixel_ratio_);
if (!web_event)
« no previous file with comments | « sky/shell/gpu/rasterizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698