1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_COMMON_VSYNC_WAITER_FALLBACK_H_
6#define FLUTTER_SHELL_COMMON_VSYNC_WAITER_FALLBACK_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/fml/memory/weak_ptr.h"
10#include "flutter/fml/time/time_point.h"
11#include "flutter/shell/common/vsync_waiter.h"
12
13namespace flutter {
14
15/// A |VsyncWaiter| that will fire at 60 fps irrespective of the vsync.
16class VsyncWaiterFallback final : public VsyncWaiter {
17 public:
18 VsyncWaiterFallback(TaskRunners task_runners);
19
20 ~VsyncWaiterFallback() override;
21
22 private:
23 fml::TimePoint phase_;
24
25 // |VsyncWaiter|
26 void AwaitVSync() override;
27
28 FML_DISALLOW_COPY_AND_ASSIGN(VsyncWaiterFallback);
29};
30
31} // namespace flutter
32
33#endif // FLUTTER_SHELL_COMMON_VSYNC_WAITER_FALLBACK_H_
34