#include "flutter/shell/platform/linux/fl_task_runner.h"
#include "flutter/shell/platform/linux/fl_engine_private.h"
Go to the source code of this file.
Classes | |
struct | _FlTaskRunner |
struct | _FlTaskRunnerTask |
Typedefs | |
typedef struct _FlTaskRunnerTask | FlTaskRunnerTask |
Functions | |
static void | fl_task_runner_process_expired_tasks_locked (FlTaskRunner *self) |
static void | fl_task_runner_tasks_did_change_locked (FlTaskRunner *self) |
static gboolean | fl_task_runner_on_expired_timeout (gpointer data) |
static gint64 | fl_task_runner_next_task_expiration_time_locked (FlTaskRunner *self) |
void | fl_task_runner_dispose (GObject *object) |
static void | fl_task_runner_class_init (FlTaskRunnerClass *klass) |
static void | fl_task_runner_init (FlTaskRunner *self) |
FlTaskRunner * | fl_task_runner_new (FlEngine *engine) |
void | fl_task_runner_post_task (FlTaskRunner *self, FlutterTask task, uint64_t target_time_nanos) |
void | fl_task_runner_block_main_thread (FlTaskRunner *self) |
void | fl_task_runner_release_main_thread (FlTaskRunner *self) |
Variables | |
static constexpr int | kMicrosecondsPerNanosecond = 1000 |
static constexpr int | kMillisecondsPerMicrosecond = 1000 |
typedef struct _FlTaskRunnerTask FlTaskRunnerTask |
void fl_task_runner_block_main_thread | ( | FlTaskRunner * | task_runner | ) |
fl_task_runner_block_main_thread: @task_runner: an #FlTaskRunner.
Blocks main thread until fl_task_runner_release_main_thread is called. While main thread is blocked tasks posted to #FlTaskRunner are executed as usual. Must be invoked on main thread.
Definition at line 176 of file fl_task_runner.cc.
References fl_task_runner_next_task_expiration_time_locked(), fl_task_runner_process_expired_tasks_locked(), and fl_task_runner_tasks_did_change_locked().
Referenced by fl_renderer_wait_for_frame().
|
static |
Definition at line 145 of file fl_task_runner.cc.
References fl_task_runner_dispose().
void fl_task_runner_dispose | ( | GObject * | object | ) |
|
static |
Definition at line 149 of file fl_task_runner.cc.
FlTaskRunner* fl_task_runner_new | ( | FlEngine * | engine | ) |
fl_task_runner_new: @engine: the #FlEngine owning the task runner.
Creates new task runner instance.
Returns: an #FlTaskRunner.
Definition at line 154 of file fl_task_runner.cc.
Referenced by fl_engine_start().
|
static |
Definition at line 94 of file fl_task_runner.cc.
References _FlTaskRunnerTask::task_time_micros.
Referenced by fl_task_runner_block_main_thread(), and fl_task_runner_tasks_did_change_locked().
|
static |
Definition at line 73 of file fl_task_runner.cc.
References fl_task_runner_process_expired_tasks_locked(), and fl_task_runner_tasks_did_change_locked().
Referenced by fl_task_runner_tasks_did_change_locked().
void fl_task_runner_post_task | ( | FlTaskRunner * | task_runner, |
FlutterTask | task, | ||
uint64_t | target_time_nanos | ||
) |
fl_task_runner_post_task: @task_runner: an #FlTaskRunner. @task: Flutter task being scheduled @target_time_nanos: absolute time in nanoseconds
Posts a Flutter task to be executed on main thread. This function is thread safe and may be called from any thread.
Definition at line 161 of file fl_task_runner.cc.
References fl_task_runner_tasks_did_change_locked(), kMicrosecondsPerNanosecond, _FlTaskRunnerTask::task, and _FlTaskRunnerTask::task_time_micros.
Referenced by fl_engine_post_task().
|
static |
Definition at line 34 of file fl_task_runner.cc.
References fl_engine_execute_task(), _FlTaskRunnerTask::task, and _FlTaskRunnerTask::task_time_micros.
Referenced by fl_task_runner_block_main_thread(), and fl_task_runner_on_expired_timeout().
void fl_task_runner_release_main_thread | ( | FlTaskRunner * | self | ) |
fl_task_runner_release_main_thread: @task_runner: an #FlTaskRunner.
Unblocks main thread. This will resume normal processing of main loop. Can be invoked from any thread.
Definition at line 197 of file fl_task_runner.cc.
References TRUE.
Referenced by fl_renderer_unblock_main_thread().
|
static |
Definition at line 106 of file fl_task_runner.cc.
References fl_task_runner_next_task_expiration_time_locked(), fl_task_runner_on_expired_timeout(), and kMillisecondsPerMicrosecond.
Referenced by fl_task_runner_block_main_thread(), fl_task_runner_on_expired_timeout(), and fl_task_runner_post_task().
|
staticconstexpr |
Definition at line 8 of file fl_task_runner.cc.
Referenced by fl_task_runner_post_task().
|
staticconstexpr |
Definition at line 9 of file fl_task_runner.cc.
Referenced by fl_task_runner_tasks_did_change_locked().