Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
headless_event_loop.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_GLFW_HEADLESS_EVENT_LOOP_H_
6#define FLUTTER_SHELL_PLATFORM_GLFW_HEADLESS_EVENT_LOOP_H_
7
8#include <condition_variable>
9
10#include "flutter/shell/platform/glfw/event_loop.h"
11
12namespace flutter {
13
14// An event loop implementation that only handles Flutter Engine task
15// scheduling.
17 public:
20 const TaskExpiredCallback& on_task_expired);
21
23
24 // Disallow copy.
27
28 private:
29 // |EventLoop|
30 void WaitUntil(const TaskTimePoint& time) override;
31
32 // |EventLoop|
33 void Wake() override;
34
35 std::condition_variable task_queue_condition_;
36};
37
38} // namespace flutter
39
40#endif // FLUTTER_SHELL_PLATFORM_GLFW_HEADLESS_EVENT_LOOP_H_
std::function< void(const FlutterTask *)> TaskExpiredCallback
Definition: event_loop.h:22
std::chrono::steady_clock::time_point TaskTimePoint
Definition: event_loop.h:50
HeadlessEventLoop(const HeadlessEventLoop &)=delete
HeadlessEventLoop & operator=(const HeadlessEventLoop &)=delete
HeadlessEventLoop(std::thread::id main_thread_id, const TaskExpiredCallback &on_task_expired)
Dart_NativeFunction function
Definition: fuchsia.cc:51
static double time(int loops, Benchmark *bench, Target *target)
Definition: nanobench.cpp:394
const uintptr_t id