Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
glfw
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
12
namespace
flutter
{
13
14
// An event loop implementation that only handles Flutter Engine task
15
// scheduling.
16
class
HeadlessEventLoop
:
public
EventLoop
{
17
public
:
18
using
TaskExpiredCallback
= std::function<void(
const
FlutterTask
*)>;
19
HeadlessEventLoop
(std::thread::id main_thread_id,
20
const
TaskExpiredCallback
& on_task_expired);
21
22
~HeadlessEventLoop
();
23
24
// Disallow copy.
25
HeadlessEventLoop
(
const
HeadlessEventLoop
&) =
delete
;
26
HeadlessEventLoop
&
operator=
(
const
HeadlessEventLoop
&) =
delete
;
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_
flutter::EventLoop
Definition
event_loop.h:20
flutter::EventLoop::TaskTimePoint
std::chrono::steady_clock::time_point TaskTimePoint
Definition
event_loop.h:50
flutter::HeadlessEventLoop
Definition
headless_event_loop.h:16
flutter::HeadlessEventLoop::HeadlessEventLoop
HeadlessEventLoop(const HeadlessEventLoop &)=delete
flutter::HeadlessEventLoop::operator=
HeadlessEventLoop & operator=(const HeadlessEventLoop &)=delete
flutter::HeadlessEventLoop::Wake
void Wake() override
Definition
headless_event_loop.cc:24
flutter::HeadlessEventLoop::~HeadlessEventLoop
~HeadlessEventLoop()
flutter::HeadlessEventLoop::WaitUntil
void WaitUntil(const TaskTimePoint &time) override
Definition
headless_event_loop.cc:18
flutter::HeadlessEventLoop::TaskExpiredCallback
std::function< void(const FlutterTask *)> TaskExpiredCallback
Definition
headless_event_loop.h:18
flutter
Definition
asset_manager.cc:10
FlutterTask
Definition
embedder.h:1548
Generated on Fri Apr 26 2024 06:14:30 for Flutter Engine by
1.9.8