5#ifndef FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_TASK_RUNNER_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_TASK_RUNNER_H_
9#include <unordered_map>
11#include "flutter/fml/macros.h"
12#include "flutter/fml/task_runner.h"
75 const size_t embedder_identifier_;
77 std::mutex tasks_mutex_;
78 uint64_t last_baton_ = 0;
79 std::unordered_map<uint64_t, fml::closure> pending_tasks_;
93 bool RunsTasksOnCurrentThread()
override;
bool PostTask(uint64_t baton)
size_t GetEmbedderIdentifier() const
The unique identifier provided by the embedder for the task runner. Embedders whose dispatch tables s...
EmbedderTaskRunner(DispatchTable table, size_t embedder_identifier)
Create a task runner with a dispatch table for delegation of task runner responsibility to the embedd...
~EmbedderTaskRunner() override
Dart_NativeFunction function
std::function< void()> closure
std::function< void(EmbedderTaskRunner *task_runner, uint64_t task_baton, fml::TimePoint target_time)> post_task_callback
std::function< bool(void)> runs_task_on_current_thread_callback