Restore "Capture Skia trace events" (#2834)
diff --git a/sky/shell/shell.cc b/sky/shell/shell.cc index b361283..37cdf9d 100644 --- a/sky/shell/shell.cc +++ b/sky/shell/shell.cc
@@ -18,6 +18,7 @@ #include "base/single_thread_task_runner.h" #include "base/trace_event/trace_event.h" #include "mojo/message_pump/message_pump_mojo.h" +#include "skia/ext/event_tracer_impl.h" #include "sky/engine/core/script/dart_init.h" #include "sky/engine/public/platform/sky_settings.h" #include "sky/shell/diagnostic/diagnostic_server.h" @@ -149,6 +150,11 @@ void Shell::Init() { base::DiscardableMemoryAllocator::SetInstance(&g_discardable.Get()); + +#ifndef FLUTTER_PRODUCT_MODE + InitSkiaEventTracer(); +#endif + DCHECK(!g_shell); g_shell = new Shell(); g_shell->ui_task_runner()->PostTask(FROM_HERE, base::Bind(&Engine::Init));
diff --git a/sky/shell/tracing_controller.cc b/sky/shell/tracing_controller.cc index a511a25..fa9058f 100644 --- a/sky/shell/tracing_controller.cc +++ b/sky/shell/tracing_controller.cc
@@ -178,7 +178,7 @@ void TracingController::StartBaseTracing() { namespace TE = base::trace_event; - auto config = TE::TraceConfig("*", TE::RECORD_CONTINUOUSLY); + auto config = TE::TraceConfig("*,disabled-by-default-skia", TE::RECORD_CONTINUOUSLY); auto log = TE::TraceLog::GetInstance();