未验证 提交 42b40b43 编写于 作者: C chenjianguang 提交者: GitHub

Fix BM_ShellShutdown regression (#18676)

上级 c9e51d07
......@@ -66,6 +66,17 @@ static void StartupAndShutdownShell(benchmark::State& state,
FML_CHECK(shell);
{
// The ui thread could be busy processing tasks after shell created, e.g.,
// default font manager setup. The measurement of shell shutdown should be
// considered after those ui tasks have been done.
benchmarking::ScopedPauseTiming pause(state, true);
fml::AutoResetWaitableEvent latch;
fml::TaskRunner::RunNowOrPostTask(thread_host->ui_thread->GetTaskRunner(),
[&latch]() { latch.Signal(); });
latch.Wait();
}
{
benchmarking::ScopedPauseTiming pause(state, !measure_shutdown);
// Shutdown must occur synchronously on the platform thread.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册