#include <task_runner.h>
Public Types | |
using | TaskTimePoint = std::chrono::steady_clock::time_point |
using | TaskExpiredCallback = std::function< void(const FlutterTask *)> |
using | TaskClosure = std::function< void()> |
Public Member Functions | |
TaskRunner (CurrentTimeProc get_current_time, const TaskExpiredCallback &on_task_expired) | |
virtual | ~TaskRunner () |
virtual bool | RunsTasksOnCurrentThread () const |
void | PostFlutterTask (FlutterTask flutter_task, uint64_t flutter_target_time_nanos) |
void | PostTask (TaskClosure task) |
void | RunNowOrPostTask (TaskClosure task) |
std::chrono::nanoseconds | ProcessTasks () |
Definition at line 26 of file task_runner.h.
using flutter::TaskRunner::TaskClosure = std::function<void()> |
Definition at line 30 of file task_runner.h.
using flutter::TaskRunner::TaskExpiredCallback = std::function<void(const FlutterTask*)> |
Definition at line 29 of file task_runner.h.
using flutter::TaskRunner::TaskTimePoint = std::chrono::steady_clock::time_point |
Definition at line 28 of file task_runner.h.
flutter::TaskRunner::TaskRunner | ( | CurrentTimeProc | get_current_time, |
const TaskExpiredCallback & | on_task_expired | ||
) |
Definition at line 12 of file task_runner.cc.
References flutter::TaskRunnerWindow::GetSharedInstance().
|
virtual |
Definition at line 21 of file task_runner.cc.
void flutter::TaskRunner::PostFlutterTask | ( | FlutterTask | flutter_task, |
uint64_t | flutter_target_time_nanos | ||
) |
Definition at line 80 of file task_runner.cc.
void flutter::TaskRunner::PostTask | ( | TaskClosure | task | ) |
Definition at line 88 of file task_runner.cc.
Referenced by RunNowOrPostTask(), flutter::SettingsPlugin::WatchPreferredBrightnessChanged(), and flutter::SettingsPlugin::WatchTextScaleFactorChanged().
|
virtual |
|
inline |
Definition at line 51 of file task_runner.h.
References PostTask(), and RunsTasksOnCurrentThread().
Referenced by flutter::FlutterWindowsTextureRegistrar::MarkTextureFrameAvailable(), and flutter::FlutterWindowsTextureRegistrar::UnregisterTexture().
|
virtual |
Definition at line 112 of file task_runner.cc.
Referenced by RunNowOrPostTask().