#include <glib-object.h>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlTaskRunner, fl_task_runner, FL, TASK_RUNNER, GObject) |
FlTaskRunner * | fl_task_runner_new (FlEngine *engine) |
void | fl_task_runner_post_task (FlTaskRunner *task_runner, FlutterTask task, uint64_t target_time_nanos) |
void | fl_task_runner_block_main_thread (FlTaskRunner *task_runner) |
void | fl_task_runner_release_main_thread (FlTaskRunner *self) |
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().
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().
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().
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().
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlTaskRunner | , |
fl_task_runner | , | ||
FL | , | ||
TASK_RUNNER | , | ||
GObject | |||
) |