138 {
141
142
144
145
146 if (services) {
147
148
149
150
151
152
153
154
155
156
157 std::shared_ptr<fuchsia::media::ProfileProviderSyncPtr>
158 media_profile_provider =
159 std::make_shared<fuchsia::media::ProfileProviderSyncPtr>();
160
161 const zx_status_t connect_status =
162 services->Connect(media_profile_provider->NewRequest());
163 if (connect_status != ZX_OK) {
165 << "Failed to connect to " << fuchsia::media::ProfileProvider::Name_
166 << ": " << zx_status_get_string(connect_status)
167 << " This is not a fatal error, but threads created by the engine "
168 "will run at default priority, regardless of the requested "
169 "priority.";
170 } else {
171
172
173 SetThreadRole(*media_profile_provider, name_prefix + ".type.platform");
174
175
176
177 config_setter = [name_prefix, media_profile_provider](
179 SetThreadConfig(name_prefix, *media_profile_provider, config);
180 };
181 }
182 }
183
185
190 thread_host_config.SetUIConfig(
192 flutter::ThreadHost::Type::kUi, name_prefix),
194 thread_host_config.SetIOConfig(
196 flutter::ThreadHost::Type::kIo, name_prefix),
198
200}
@ kNormal
Default priority level.
@ kRaster
Suitable for thread which raster data.
@ kDisplay
Suitable for threads which generate data for the display.
static void SetCurrentThreadName(const ThreadConfig &config)
@ kRaster
Suitable for thread which raster data.
#define FML_LOG(severity)
fml::Thread::ThreadConfigSetter ThreadConfigSetter
static std::string MakeThreadName(Type type, const std::string &prefix)
Use the prefix and thread type to generator a thread name.
void SetRasterConfig(const ThreadConfig &)
Specified the IO Thread Config, meanwhile set the mask.
The collection of all the threads used by the engine.
The ThreadConfig is the thread info include thread name, thread priority.