提交 f0967c24 编写于 作者: A Adam Barth 提交者: GitHub

Remove more //base dependencies (#2870)

WTF is now //base clean.
上级 24511c92
......@@ -4,15 +4,12 @@
#include "flutter/lib/ui/painting/image_decoding.h"
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
#include "flow/texture_image.h"
#include "flutter/lib/ui/painting/image.h"
#include "flutter/tonic/dart_persistent_value.h"
#include "flutter/tonic/mojo_converter.h"
#include "glue/movable_wrapper.h"
#include "glue/trace_event.h"
#include "lib/tonic/logging/dart_invoke.h"
#include "lib/tonic/typed_data/uint8_list.h"
#include "sky/engine/platform/mojo/data_pipe.h"
......
......@@ -13,6 +13,7 @@ source_set("libraries") {
"//flow",
"//flutter/lib/ui",
"//flutter/tonic",
"//glue",
"//lib/ftl",
"//mojo/application",
"//mojo/data_pipe_utils",
......
......@@ -52,7 +52,6 @@
#include "sky/engine/core/rendering/RenderView.h"
#include "sky/engine/platform/LengthFunctions.h"
#include "sky/engine/platform/Partitions.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/platform/geometry/FloatPoint3D.h"
#include "sky/engine/platform/geometry/FloatRect.h"
#include "sky/engine/platform/geometry/TransformState.h"
......
......@@ -39,7 +39,6 @@
#include "sky/engine/core/rendering/RenderView.h"
#include "sky/engine/core/rendering/style/ShadowList.h"
#include "sky/engine/platform/Partitions.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/platform/geometry/TransformState.h"
#include "sky/engine/platform/graphics/GraphicsContext.h"
#include "sky/engine/wtf/RefCountedLeakCounter.h"
......
......@@ -23,7 +23,6 @@
#include "sky/engine/core/rendering/HitTestResult.h"
#include "sky/engine/core/rendering/RenderGeometryMap.h"
#include "sky/engine/core/rendering/RenderLayer.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/platform/geometry/FloatQuad.h"
#include "sky/engine/platform/geometry/TransformState.h"
#include "sky/engine/platform/graphics/GraphicsContext.h"
......@@ -60,7 +59,6 @@ bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result)
bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& location, HitTestResult& result)
{
TRACE_EVENT0("blink", "RenderView::hitTest");
m_hitTestCount++;
// TODO(ojan): Does any of this intersection stuff make sense for Sky?
......
......@@ -5,21 +5,20 @@
#include "sky/engine/core/script/dart_controller.h"
#include "base/bind.h"
#include "base/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "dart/runtime/include/dart_tools_api.h"
#include "lib/tonic/scopes/dart_api_scope.h"
#include "flutter/tonic/dart_class_library.h"
#include "flutter/tonic/dart_dependency_catcher.h"
#include "lib/tonic/logging/dart_error.h"
#include "lib/tonic/logging/dart_invoke.h"
#include "flutter/tonic/dart_io.h"
#include "lib/tonic/scopes/dart_isolate_scope.h"
#include "flutter/tonic/dart_library_loader.h"
#include "flutter/tonic/dart_message_handler.h"
#include "flutter/tonic/dart_snapshot_loader.h"
#include "flutter/tonic/dart_state.h"
#include "flutter/tonic/dart_wrappable.h"
#include "glue/trace_event.h"
#include "lib/tonic/logging/dart_error.h"
#include "lib/tonic/logging/dart_invoke.h"
#include "lib/tonic/scopes/dart_api_scope.h"
#include "lib/tonic/scopes/dart_isolate_scope.h"
#include "mojo/data_pipe_utils/data_pipe_utils.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "sky/engine/bindings/dart_mojo_internal.h"
......
......@@ -486,7 +486,7 @@ static void EmbedderTimelineStartRecording() {
if (!callbacks) {
return;
}
callbacks->start_tracing_callback.Run();
callbacks->start_tracing_callback();
}
static void EmbedderTimelineStopRecording() {
......@@ -494,7 +494,7 @@ static void EmbedderTimelineStopRecording() {
if (!callbacks) {
return;
}
callbacks->stop_tracing_callback.Run();
callbacks->stop_tracing_callback();
}
void SetServiceIsolateHook(ServiceIsolateHook hook) {
......
......@@ -5,8 +5,8 @@
#ifndef SKY_ENGINE_CORE_SCRIPT_DART_INIT_H_
#define SKY_ENGINE_CORE_SCRIPT_DART_INIT_H_
#include "base/callback.h"
#include "dart/runtime/include/dart_api.h"
#include "lib/ftl/functional/closure.h"
#include "sky/engine/wtf/OperatingSystem.h"
#include <string>
......@@ -39,7 +39,7 @@ extern const char kSnapshotAssetKey[];
bool IsRunningPrecompiledCode();
using EmbedderTracingCallback = base::Callback<void(void)>;
using EmbedderTracingCallback = ftl::Closure;
typedef void (*ServiceIsolateHook)(bool);
typedef void (*RegisterNativeServiceProtocolExtensionHook)(bool);
......
......@@ -5,9 +5,7 @@
#include "sky/engine/core/script/directory_asset_bundle.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/task_runner.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/worker_pool.h"
#include "mojo/data_pipe_utils/data_pipe_utils.h"
......
......@@ -6,7 +6,6 @@
#define SKY_ENGINE_CORE_SCRIPT_DIRECTORY_ASSET_BUNDLE_H_
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/cpp/environment/async_waiter.h"
......@@ -39,4 +38,4 @@ class DirectoryAssetBundleService : public mojo::asset_bundle::AssetBundle {
} // namespace blink
#endif // SKY_ENGINE_CORE_SCRIPT_DIRECTORY_ASSET_BUNDLE_H_
\ No newline at end of file
#endif // SKY_ENGINE_CORE_SCRIPT_DIRECTORY_ASSET_BUNDLE_H_
......@@ -4,7 +4,6 @@
#include "sky/engine/core/text/ParagraphBuilder.h"
#include "base/location.h"
#include "flutter/tonic/dart_args.h"
#include "flutter/tonic/dart_binding_macros.h"
#include "flutter/tonic/dart_library_natives.h"
......
......@@ -4,12 +4,11 @@
#include "sky/engine/core/text/ParagraphBuilder.h"
#include "base/location.h"
#include "flutter/tonic/dart_args.h"
#include "flutter/tonic/dart_binding_macros.h"
#include "flutter/tonic/dart_library_natives.h"
#include "lib/ftl/tasks/task_runner.h"
#include "lib/tonic/converter/dart_converter.h"
#include "flutter/tonic/dart_library_natives.h"
#include "sky/engine/core/rendering/RenderInline.h"
#include "sky/engine/core/rendering/RenderParagraph.h"
#include "sky/engine/core/rendering/RenderText.h"
......
......@@ -31,7 +31,6 @@ source_set("platform") {
"PurgeableVector.h",
"SharedBuffer.cpp",
"SharedBuffer.h",
"TraceEvent.h",
"animation/AnimationUtilities.h",
"animation/AnimationValue.h",
"animation/KeyframeValueList.cpp",
......
......@@ -26,7 +26,6 @@
#include "sky/engine/platform/SharedBuffer.h"
#include "base/bind.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/wtf/unicode/UTF8.h"
#include "sky/engine/wtf/unicode/Unicode.h"
......
// Copyright 2014 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 "base/trace_event/trace_event.h"
......@@ -28,15 +28,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "lib/ftl/logging.h"
#include "sky/engine/platform/fonts/FontCache.h"
#include "base/logging.h"
namespace blink {
void FontCache::getFontForCharacter(UChar32,
const char*,
FontCache::PlatformFallbackFont*) {
LOG(INFO) << "Font fallbacks unimplemented on Mac.";
FTL_LOG(INFO) << "Font fallbacks unimplemented on Mac.";
}
} // namespace blink
......@@ -26,7 +26,6 @@
#include "sky/engine/platform/graphics/GraphicsContext.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/platform/geometry/IntRect.h"
#include "sky/engine/platform/geometry/RoundedRect.h"
#include "sky/engine/platform/graphics/Gradient.h"
......@@ -1473,10 +1472,8 @@ SkPMColor GraphicsContext::antiColors2(int index)
void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
{
if (m_trackTextRegion) {
TRACE_EVENT0("skia", "GraphicsContext::didDrawTextInRect");
if (m_trackTextRegion)
m_textRegion.join(textRect);
}
}
void GraphicsContext::preparePaintForDrawRectToRect(
......
......@@ -28,7 +28,6 @@
#include "sky/engine/platform/Length.h"
#include "sky/engine/platform/SharedBuffer.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/platform/geometry/FloatPoint.h"
#include "sky/engine/platform/geometry/FloatRect.h"
#include "sky/engine/platform/geometry/FloatSize.h"
......
......@@ -7,6 +7,7 @@ source_set("sky") {
"//base",
"//flow",
"//flutter/lib/ui",
"//glue",
"//lib/ftl/",
"//mojo/public/cpp/system",
"//mojo/services/network/interfaces",
......
......@@ -4,9 +4,8 @@
#include "sky/engine/public/sky/sky_view.h"
#include "base/bind.h"
#include "base/trace_event/trace_event.h"
#include "flutter/lib/ui/compositing/scene.h"
#include "glue/trace_event.h"
#include "sky/engine/core/script/dart_controller.h"
#include "sky/engine/core/script/ui_dart_state.h"
#include "sky/engine/core/window/window.h"
......
......@@ -192,7 +192,6 @@ component("wtf") {
]
deps = [
"//base",
"//glue",
"//third_party/icu",
]
......@@ -240,11 +239,7 @@ test("unittests") {
deps = [
":test_support",
":wtf",
"//base",
"//base/allocator",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/gtest",
]
}
......
......@@ -28,15 +28,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include "base/test/test_suite.h"
#include "gtest/gtest.h"
#include "sky/engine/wtf/MainThread.h"
#include "sky/engine/wtf/WTF.h"
int main(int argc, char** argv)
{
WTF::initialize();
WTF::initializeMainThread();
return base::RunUnitTestsUsingBaseTestSuite(argc, argv);
int main(int argc, char** argv) {
WTF::initialize();
WTF::initializeMainThread();
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
......@@ -18,10 +18,8 @@ namespace shell {
TracingController::TracingController()
: picture_tracing_enabled_(false), tracing_active_(false) {
auto start =
base::Bind(&TracingController::StartTracing, base::Unretained(this));
auto stop =
base::Bind(&TracingController::StopTracing, base::Unretained(this));
auto start = [this]() { StartTracing(); };
auto stop = [this]() { StopTracing(); };
blink::SetEmbedderTracingCallbacks(
WTF::MakeUnique<blink::EmbedderTracingCallbacks>(start, stop));
......@@ -178,7 +176,8 @@ void TracingController::StartTracing() {
void TracingController::StartBaseTracing() {
namespace TE = base::trace_event;
auto config = TE::TraceConfig("*,disabled-by-default-skia", TE::RECORD_CONTINUOUSLY);
auto config =
TE::TraceConfig("*,disabled-by-default-skia", TE::RECORD_CONTINUOUSLY);
auto log = TE::TraceLog::GetInstance();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册