Create a session presentation backed Vsync waiter on Fuchsia. (flutter/engine#5255)

This commit is contained in:
Chinmay Garde
2018-05-14 16:51:19 -07:00
committed by GitHub
parent 8fa8950266
commit baf5293906
2 changed files with 2 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ VsyncWaiterFallback::~VsyncWaiterFallback() = default;
constexpr fxl::TimeDelta interval = fxl::TimeDelta::FromSecondsF(1.0 / 60.0);
// |shell::VsyncWaiter|
void VsyncWaiterFallback::AwaitVSync() {
fxl::TimePoint now = fxl::TimePoint::Now();
fxl::TimePoint next = SnapToNextTick(now, phase_, interval);

View File

@@ -22,6 +22,7 @@ class VsyncWaiterFallback final : public VsyncWaiter {
fxl::TimePoint phase_;
fxl::WeakPtrFactory<VsyncWaiterFallback> weak_factory_;
// |shell::VsyncWaiter|
void AwaitVSync() override;
FXL_DISALLOW_COPY_AND_ASSIGN(VsyncWaiterFallback);