Flutter Engine
The Flutter Engine
vsync_waiter_embedder.h
Go to the documentation of this file.
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_PLATFORM_EMBEDDER_VSYNC_WAITER_EMBEDDER_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_VSYNC_WAITER_EMBEDDER_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/common/vsync_waiter.h"
10
11namespace flutter {
12
13class VsyncWaiterEmbedder final : public VsyncWaiter {
14 public:
15 using VsyncCallback = std::function<void(intptr_t)>;
16
18 const flutter::TaskRunners& task_runners);
19
21
22 static bool OnEmbedderVsync(const flutter::TaskRunners& task_runners,
23 intptr_t baton,
24 fml::TimePoint frame_start_time,
25 fml::TimePoint frame_target_time);
26
27 private:
28 const VsyncCallback vsync_callback_;
29
30 // |VsyncWaiter|
31 void AwaitVSync() override;
32
33 FML_DISALLOW_COPY_AND_ASSIGN(VsyncWaiterEmbedder);
34};
35
36} // namespace flutter
37
38#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_VSYNC_WAITER_EMBEDDER_H_
static bool OnEmbedderVsync(const flutter::TaskRunners &task_runners, intptr_t baton, fml::TimePoint frame_start_time, fml::TimePoint frame_target_time)
std::function< void(intptr_t)> VsyncCallback
friend class VsyncWaiterEmbedder
Definition: vsync_waiter.h:42
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
Definition: fuchsia.cc:51