提交 a743fbf2 编写于 作者: A Adam Barth

Remove ui.tracing

This feature is redundant with the Timeline in dart:developer. I've already
switched all the clients over to using dart:developer.
上级 40281e9f
......@@ -7,7 +7,6 @@
#include "gen/sky/bindings/DartGlobal.h"
#include "sky/engine/bindings/dart_runtime_hooks.h"
#include "sky/engine/core/painting/painting.h"
#include "sky/engine/core/tracing/tracing.h"
#include "sky/engine/core/window/window.h"
#include "sky/engine/tonic/dart_converter.h"
#include "sky/engine/tonic/dart_error.h"
......@@ -41,7 +40,6 @@ void DartUI::InitForIsolate() {
DartRuntimeHooks::RegisterNatives(g_natives);
Window::RegisterNatives(g_natives);
Painting::RegisterNatives(g_natives);
Tracing::RegisterNatives(g_natives);
}
DART_CHECK_VALID(Dart_SetNativeResolver(
......
......@@ -231,8 +231,6 @@ sky_core_files = [
"text/Paragraph.h",
"text/ParagraphBuilder.cpp",
"text/ParagraphBuilder.h",
"tracing/tracing.cc",
"tracing/tracing.h",
"window/window.cc",
"window/window.h",
]
......@@ -265,7 +263,6 @@ core_dart_files = get_path_info([
"dart/lerp.dart",
"dart/painting.dart",
"dart/text.dart",
"dart/tracing.dart",
"dart/window.dart",
"painting/Color.dart",
"painting/ColorFilter.dart",
......
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of dart_ui;
class _Tracing {
void begin(String name) native "Tracing_begin";
void end(String name) native "Tracing_end";
}
final _Tracing tracing = new _Tracing();
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/engine/core/tracing/tracing.h"
#include "base/trace_event/trace_event.h"
#include "sky/engine/tonic/dart_converter.h"
#include "sky/engine/wtf/text/StringUTF8Adaptor.h"
namespace blink {
namespace {
void BeginTracing(Dart_NativeArguments args) {
Dart_Handle exception = nullptr;
String name = DartConverter<String>::FromArguments(args, 1, exception);
if (exception) {
Dart_ThrowException(exception);
return;
}
StringUTF8Adaptor utf8(name);
// TRACE_EVENT_COPY_BEGIN0 needs a c-style null-terminated string.
CString cstring(utf8.data(), utf8.length());
TRACE_EVENT_COPY_BEGIN0("script", cstring.data());
}
void EndTracing(Dart_NativeArguments args) {
Dart_Handle exception = nullptr;
String name = DartConverter<String>::FromArguments(args, 1, exception);
if (exception) {
Dart_ThrowException(exception);
return;
}
StringUTF8Adaptor utf8(name);
// TRACE_EVENT_COPY_END0 needs a c-style null-terminated string.
CString cstring(utf8.data(), utf8.length());
TRACE_EVENT_COPY_END0("script", cstring.data());
}
} // namespace
void Tracing::RegisterNatives(DartLibraryNatives* natives) {
natives->Register({
{ "Tracing_begin", BeginTracing, 2, true },
{ "Tracing_end", EndTracing, 2, true },
});
}
} // namespace blink
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_CORE_TRACING_TRACING_H_
#define SKY_ENGINE_CORE_TRACING_TRACING_H_
#include "sky/engine/tonic/dart_library_natives.h"
namespace blink {
class Tracing {
public:
static void RegisterNatives(DartLibraryNatives* natives);
};
} // namespace blink
#endif // SKY_ENGINE_CORE_TRACING_TRACING_H_
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册