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

Unified Diff: sky/engine/core/dom/Microtask.cpp

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 | « no previous file | sky/shell/gpu/rasterizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Microtask.cpp
diff --git a/sky/engine/core/dom/Microtask.cpp b/sky/engine/core/dom/Microtask.cpp
index 04c27dcf9b1151320ae180e9329d54f754caa12a..7be9902076e9a6739dda9803f0a3d06180951054 100644
--- a/sky/engine/core/dom/Microtask.cpp
+++ b/sky/engine/core/dom/Microtask.cpp
@@ -32,7 +32,7 @@
#include "sky/engine/core/dom/Microtask.h"
#include "base/bind.h"
-#include "sky/engine/platform/TraceEvent.h"
+#include "base/trace_event/trace_event.h"
#include "sky/engine/public/platform/WebThread.h"
#include "sky/engine/wtf/OwnPtr.h"
#include "sky/engine/wtf/Vector.h"
@@ -71,6 +71,8 @@ void Microtask::performCheckpoint()
{
MicrotaskQueue& queue = microtaskQueue();
while(!queue.isEmpty()) {
+ TRACE_EVENT0("sky", "Microtask::performCheckpoint");
+
MicrotaskQueue local;
swap(queue, local);
for (const auto& task : local)
@@ -78,12 +80,6 @@ void Microtask::performCheckpoint()
}
}
-// static void microtaskFunctionCallback(void* data)
-// {
-// OwnPtr<WebThread::Task> task = adoptPtr(static_cast<WebThread::Task*>(data));
-// task->run();
-// }
-
void Microtask::enqueueMicrotask(PassOwnPtr<WebThread::Task> callback)
{
microtaskQueue().append(callback);
« no previous file with comments | « no previous file | sky/shell/gpu/rasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698