5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_TASK_RUNNER_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_TASK_RUNNER_H_
16 #include "flutter/shell/platform/embedder/embedder.h"
44 uint64_t flutter_target_time_nanos);
51 void PollOnce(std::chrono::milliseconds timeout);
67 typedef std::variant<FlutterTask, TaskClosure> TaskVariant;
76 if (a.fire_time == b.fire_time) {
77 return a.order > b.order;
79 return a.fire_time > b.fire_time;
85 void EnqueueTask(Task task);
88 virtual void WakeUp();
95 return TaskTimePoint::clock::now();
100 uint64_t flutter_target_time_nanos)
const;
104 std::mutex task_queue_mutex_;
105 std::priority_queue<Task, std::deque<Task>, Task::Comparer> task_queue_;
106 DWORD main_thread_id_;
107 std::shared_ptr<TaskRunnerWindow> task_runner_window_;
114 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TASK_RUNNER_H_