Flutter Engine
flutter::ThreadHost Struct Reference

The collection of all the threads used by the engine. More...

#include <thread_host.h>

Public Types

enum  Type {
  Platform = 1 << 0,
  UI = 1 << 1,
  RASTER = 1 << 2,
  IO = 1 << 3,
  Profiler = 1 << 4
}
 

Public Member Functions

 ThreadHost ()
 
 ThreadHost (ThreadHost &&)
 
ThreadHostoperator= (ThreadHost &&)=default
 
 ThreadHost (std::string name_prefix, uint64_t type_mask)
 
 ~ThreadHost ()
 

Public Attributes

std::string name_prefix
 
std::unique_ptr< fml::Threadplatform_thread
 
std::unique_ptr< fml::Threadui_thread
 
std::unique_ptr< fml::Threadraster_thread
 
std::unique_ptr< fml::Threadio_thread
 
std::unique_ptr< fml::Threadprofiler_thread
 

Detailed Description

The collection of all the threads used by the engine.

Definition at line 16 of file thread_host.h.

Member Enumeration Documentation

◆ Type

Enumerator
Platform 
UI 
RASTER 
IO 
Profiler 

Definition at line 17 of file thread_host.h.

17  {
18  Platform = 1 << 0,
19  UI = 1 << 1,
20  RASTER = 1 << 2,
21  IO = 1 << 3,
22  Profiler = 1 << 4,
23  };

Constructor & Destructor Documentation

◆ ThreadHost() [1/3]

flutter::ThreadHost::ThreadHost ( )
default

◆ ThreadHost() [2/3]

flutter::ThreadHost::ThreadHost ( ThreadHost &&  )
default

◆ ThreadHost() [3/3]

flutter::ThreadHost::ThreadHost ( std::string  name_prefix,
uint64_t  type_mask 
)

Definition at line 13 of file thread_host.cc.

References io_thread, name_prefix, platform_thread, profiler_thread, raster_thread, flutter::UI, ui_thread, and ~ThreadHost().

14  : name_prefix(name_prefix_arg) {
15  if (mask & ThreadHost::Type::Platform) {
16  platform_thread = std::make_unique<fml::Thread>(name_prefix + ".platform");
17  }
18 
19  if (mask & ThreadHost::Type::UI) {
20  ui_thread = std::make_unique<fml::Thread>(name_prefix + ".ui");
21  }
22 
23  if (mask & ThreadHost::Type::RASTER) {
24  raster_thread = std::make_unique<fml::Thread>(name_prefix + ".raster");
25  }
26 
27  if (mask & ThreadHost::Type::IO) {
28  io_thread = std::make_unique<fml::Thread>(name_prefix + ".io");
29  }
30 
31  if (mask & ThreadHost::Type::Profiler) {
32  profiler_thread = std::make_unique<fml::Thread>(name_prefix + ".profiler");
33  }
34 }
std::unique_ptr< fml::Thread > ui_thread
Definition: thread_host.h:27
std::unique_ptr< fml::Thread > profiler_thread
Definition: thread_host.h:30
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data observatory The hostname IP address on which the Dart Observatory should be served If not defaults to or::depending on whether ipv6 is specified disable Disable the Dart Observatory The observatory is never available in release mode Bind to the IPv6 localhost address for the Dart Observatory Ignored if observatory host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however skia deterministic Skips the call to thus avoiding swapping out some Skia function pointers based on available CPU features This is used to obtain deterministic behavior in Skia rendering disable service auth Disable the requirement for authentication codes for communicating with the VM service start Start the application paused in the Dart debugger trace Trace Skia calls This is useful when debugging the GPU threed By Skia tracing is not enabled to reduce the number of traced events trace Filters out all trace events except those that are specified in this comma separated list of allowed prefixes cache Only cache the shader in SkSL instead of binary or GLSL This should only be used during development phases The generated SkSLs can later be used in the release build for shader precompilation at launch in order to eliminate the shader compile jank trace Trace to the system use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed disallow insecure By all insecure connections are rejected force Uses separate threads for the UI
Definition: switches.h:207
std::string name_prefix
Definition: thread_host.h:25
std::unique_ptr< fml::Thread > io_thread
Definition: thread_host.h:29
std::unique_ptr< fml::Thread > raster_thread
Definition: thread_host.h:28
std::unique_ptr< fml::Thread > platform_thread
Definition: thread_host.h:26

◆ ~ThreadHost()

flutter::ThreadHost::~ThreadHost ( )
default

Referenced by ThreadHost().

Member Function Documentation

◆ operator=()

ThreadHost& flutter::ThreadHost::operator= ( ThreadHost &&  )
default

Member Data Documentation

◆ io_thread

◆ name_prefix

std::string flutter::ThreadHost::name_prefix

Definition at line 25 of file thread_host.h.

Referenced by ThreadHost().

◆ platform_thread

◆ profiler_thread

std::unique_ptr<fml::Thread> flutter::ThreadHost::profiler_thread

Definition at line 30 of file thread_host.h.

Referenced by ThreadHost().

◆ raster_thread

◆ ui_thread


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