未验证 提交 9bafb3cd 编写于 作者: K Kaushik Iska 提交者: GitHub

[tests] Use distinct begin and end times (#14361)

上级 fc8cafb3
......@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <future>
#define FML_USED_ON_EMBEDDER
#include "flutter/shell/common/shell_test.h"
......@@ -159,8 +158,10 @@ void ShellTest::PumpOneFrame(Shell* shell,
shell->GetTaskRunners().GetUITaskRunner()->PostTask(
[&latch, engine = shell->weak_engine_, viewport_metrics]() {
engine->SetViewportMetrics(std::move(viewport_metrics));
engine->animator_->BeginFrame(fml::TimePoint::Now(),
fml::TimePoint::Now());
const auto frame_begin_time = fml::TimePoint::Now();
const auto frame_end_time =
frame_begin_time + fml::TimeDelta::FromSecondsF(1.0 / 60.0);
engine->animator_->BeginFrame(frame_begin_time, frame_end_time);
latch.Signal();
});
latch.Wait();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册