提交 76d5cf23 编写于 作者: A Adam Barth

Don't spin hot in MessagePumpGLFW (#2636)

When there are no pending timers, we should sit in glfwWaitEvents instead of
continuously calling glfwPollEvents. This reduces CPU utilization
significantly.
上级 6e3228cf
......@@ -48,7 +48,7 @@ void MessagePumpGLFW::Run(Delegate* delegate) {
continue;
if (delayed_work_time_.is_null()) {
glfwPollEvents();
glfwWaitEvents();
} else {
base::TimeDelta delay = delayed_work_time_ - base::TimeTicks::Now();
if (delay > base::TimeDelta()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册