提交 b18eecb5 编写于 作者: E Eric Seidel

Make tracing work in the new .dart world.

R=abarth@chromium.org, viktorl@google.com

Review URL: https://codereview.chromium.org/1152483006
上级 00ead9f7
......@@ -19,6 +19,8 @@ part '{{callback.name}}.dart';
Window window;
Document get document => window.document;
final Tracing tracing = new Tracing();
View view;
typedef EventListener(Event event);
......@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
interface Tracing {
[
Constructor()
] interface Tracing {
void begin(DOMString name);
void end(DOMString name);
};
......@@ -7,6 +7,7 @@ import 'dart:sky';
double timeBase = null;
void beginFrame(double timeStamp) {
tracing.begin('beginFrame');
if (timeBase == null)
timeBase = timeStamp;
double delta = timeStamp - timeBase;
......@@ -17,6 +18,7 @@ void beginFrame(double timeStamp) {
new Paint()..setARGB(255, 0, 255, 0));
view.picture = canvas.endRecording();
view.scheduleFrame();
tracing.end('beginFrame');
}
void main() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册