#include <thread_host.h>
Public Member Functions | |
| ThreadHostConfig (const ThreadConfigSetter &setter=fml::Thread::SetCurrentThreadName) | |
| ThreadHostConfig (const std::string &name_prefix, uint64_t mask, const ThreadConfigSetter &setter=fml::Thread::SetCurrentThreadName) | |
| ThreadHostConfig (uint64_t mask, const ThreadConfigSetter &setter=fml::Thread::SetCurrentThreadName) | |
| bool | isThreadNeeded (Type type) const |
| Check if need to create thread. | |
| void | SetUIConfig (const ThreadConfig &) |
| Specified the UI Thread Config, meanwhile set the mask. | |
| void | SetPlatformConfig (const ThreadConfig &) |
| Specified the Platform Thread Config, meanwhile set the mask. | |
| void | SetRasterConfig (const ThreadConfig &) |
| Specified the IO Thread Config, meanwhile set the mask. | |
| void | SetIOConfig (const ThreadConfig &) |
| Specified the IO Thread Config, meanwhile set the mask. | |
| void | SetProfilerConfig (const ThreadConfig &) |
| Specified the ProfilerThread Config, meanwhile set the mask. | |
Static Public Member Functions | |
| static std::string | MakeThreadName (Type type, const std::string &prefix) |
| Use the prefix and thread type to generator a thread name. | |
Public Attributes | |
| uint64_t | type_mask |
| std::string | name_prefix = "" |
| const ThreadConfigSetter | config_setter |
| std::optional< ThreadConfig > | platform_config |
| std::optional< ThreadConfig > | ui_config |
| std::optional< ThreadConfig > | raster_config |
| std::optional< ThreadConfig > | io_config |
| std::optional< ThreadConfig > | profiler_config |
The collection of all the thread configures, and we create custom thread configure in engine to info the thread.
Definition at line 32 of file thread_host.h.
|
inlineexplicit |
Definition at line 33 of file thread_host.h.
|
inline |
Definition at line 37 of file thread_host.h.
|
inlineexplicit |
Definition at line 43 of file thread_host.h.
|
inline |
Check if need to create thread.
Definition at line 49 of file thread_host.h.
References type, and type_mask.
Referenced by flutter::ThreadHost::ThreadHost().
|
static |
Use the prefix and thread type to generator a thread name.
Definition at line 15 of file thread_host.cc.
References flutter::ThreadHost::kIo, flutter::ThreadHost::kPlatform, flutter::ThreadHost::kProfiler, flutter::ThreadHost::kRaster, flutter::ThreadHost::kUi, and type.
Referenced by flutter::AndroidShellHolder::AndroidShellHolder(), flutter_runner::Engine::CreateThreadHost(), and flutter::MakeThreadConfig().
| void flutter::ThreadHost::ThreadHostConfig::SetIOConfig | ( | const ThreadConfig & | config | ) |
Specified the IO Thread Config, meanwhile set the mask.
Definition at line 32 of file thread_host.cc.
References flutter::ThreadHost::kIo.
| void flutter::ThreadHost::ThreadHostConfig::SetPlatformConfig | ( | const ThreadConfig & | config | ) |
Specified the Platform Thread Config, meanwhile set the mask.
Definition at line 42 of file thread_host.cc.
References flutter::ThreadHost::kPlatform.
| void flutter::ThreadHost::ThreadHostConfig::SetProfilerConfig | ( | const ThreadConfig & | config | ) |
Specified the ProfilerThread Config, meanwhile set the mask.
Definition at line 53 of file thread_host.cc.
References flutter::ThreadHost::kProfiler.
| void flutter::ThreadHost::ThreadHostConfig::SetRasterConfig | ( | const ThreadConfig & | config | ) |
Specified the IO Thread Config, meanwhile set the mask.
Definition at line 48 of file thread_host.cc.
References flutter::ThreadHost::kRaster.
Referenced by flutter_runner::Engine::CreateThreadHost().
| void flutter::ThreadHost::ThreadHostConfig::SetUIConfig | ( | const ThreadConfig & | config | ) |
Specified the UI Thread Config, meanwhile set the mask.
Definition at line 37 of file thread_host.cc.
References flutter::ThreadHost::kUi.
| const ThreadConfigSetter flutter::ThreadHost::ThreadHostConfig::config_setter |
Definition at line 73 of file thread_host.h.
| std::optional<ThreadConfig> flutter::ThreadHost::ThreadHostConfig::io_config |
Definition at line 78 of file thread_host.h.
Referenced by flutter::AndroidShellHolder::AndroidShellHolder(), and flutter::ThreadHost::ThreadHost().
| std::string flutter::ThreadHost::ThreadHostConfig::name_prefix = "" |
Definition at line 71 of file thread_host.h.
| std::optional<ThreadConfig> flutter::ThreadHost::ThreadHostConfig::platform_config |
Definition at line 75 of file thread_host.h.
Referenced by flutter::ThreadHost::ThreadHost().
| std::optional<ThreadConfig> flutter::ThreadHost::ThreadHostConfig::profiler_config |
Definition at line 79 of file thread_host.h.
Referenced by flutter::ThreadHost::ThreadHost().
| std::optional<ThreadConfig> flutter::ThreadHost::ThreadHostConfig::raster_config |
Definition at line 77 of file thread_host.h.
Referenced by flutter::AndroidShellHolder::AndroidShellHolder(), and flutter::ThreadHost::ThreadHost().
| uint64_t flutter::ThreadHost::ThreadHostConfig::type_mask |
Definition at line 69 of file thread_host.h.
Referenced by isThreadNeeded().
| std::optional<ThreadConfig> flutter::ThreadHost::ThreadHostConfig::ui_config |
Definition at line 76 of file thread_host.h.
Referenced by flutter::AndroidShellHolder::AndroidShellHolder(), and flutter::ThreadHost::ThreadHost().