Flutter Engine
flutter_runner::Runner Class Referencefinal

#include <runner.h>

Inheritance diagram for flutter_runner::Runner:

Public Member Functions

 Runner (async::Loop *loop, sys::ComponentContext *context)
 
 ~Runner ()
 

Detailed Description

Definition at line 26 of file runner.h.

Constructor & Destructor Documentation

◆ Runner()

flutter_runner::Runner::Runner ( async::Loop *  loop,
sys::ComponentContext *  context 
)

Definition at line 149 of file runner.cc.

References dart_utils::VMServiceObject::kPortDirName, flutter_runner::RegisterProfilerSymbols(), flutter_runner::SetProcessName(), and flutter_runner::SetThreadName().

150  : loop_(loop), context_(context) {
151 #if !defined(DART_PRODUCT)
152  // The VM service isolate uses the process-wide namespace. It writes the
153  // vm service protocol port under /tmp. The VMServiceObject exposes that
154  // port number to The Hub.
155  context_->outgoing()->debug_dir()->AddEntry(
157  std::make_unique<dart_utils::VMServiceObject>());
158 
159  SetupTraceObserver();
160 #endif // !defined(DART_PRODUCT)
161 
162  SkGraphics::Init();
163 
164  SetupICU();
165 
166  SetProcessName();
167 
168  SetThreadName("io.flutter.runner.main");
169 
170  context_->outgoing()->AddPublicService<fuchsia::sys::Runner>(
171  std::bind(&Runner::RegisterApplication, this, std::placeholders::_1));
172 
173 #if !defined(DART_PRODUCT)
174  if (Dart_IsPrecompiledRuntime()) {
175  RegisterProfilerSymbols("pkg/data/flutter_aot_runner.dartprofilersymbols",
176  "");
177  } else {
178  RegisterProfilerSymbols("pkg/data/flutter_jit_runner.dartprofilersymbols",
179  "");
180  }
181 #endif // !defined(DART_PRODUCT)
182 }
static void SetThreadName(const std::string &thread_name)
Definition: runner.cc:131
static void RegisterProfilerSymbols(const char *symbols_path, const char *dso_name)
Definition: runner.cc:138
static constexpr const char * kPortDirName
static void SetProcessName()
Definition: runner.cc:115

◆ ~Runner()

flutter_runner::Runner::~Runner ( )

Definition at line 184 of file runner.cc.

References flutter_runner::ActiveApplication::application, flutter_runner::Application::Create(), FML_LOG, fml::icu::InitializeICU(), fml::MakeCopyable(), fml::AutoResetWaitableEvent::Signal(), TRACE_EVENT1, and fml::AutoResetWaitableEvent::Wait().

184  {
185  context_->outgoing()->RemovePublicService<fuchsia::sys::Runner>();
186 
187 #if !defined(DART_PRODUCT)
188  trace_observer_->Stop();
189 #endif // !defined(DART_PRODUCT)
190 }

The documentation for this class was generated from the following files: