The subset of state which is owned by the shell or engine and passed through the RuntimeController into DartIsolates. If a shell-owned resource needs to be exposed to the framework via UIDartState, a pointer to the resource can be added to this struct with appropriate default construction. More...
#include <ui_dart_state.h>
Public Member Functions | |
| Context (const TaskRunners &task_runners) | |
| Context (const TaskRunners &task_runners, fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate, fml::WeakPtr< IOManager > io_manager, fml::RefPtr< SkiaUnrefQueue > unref_queue, fml::TaskRunnerAffineWeakPtr< ImageDecoder > image_decoder, fml::TaskRunnerAffineWeakPtr< ImageGeneratorRegistry > image_generator_registry, std::string advisory_script_uri, std::string advisory_script_entrypoint, bool deterministic_rendering_enabled, std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner, std::shared_future< impeller::RuntimeStageBackend > runtime_stage_backend, bool enable_impeller, bool enable_flutter_gpu) | |
Public Attributes | |
| const TaskRunners | task_runners |
| fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > | snapshot_delegate |
| fml::WeakPtr< IOManager > | io_manager |
| The IO manager used by the isolate for asynchronous texture uploads. | |
| fml::RefPtr< SkiaUnrefQueue > | unref_queue |
| fml::TaskRunnerAffineWeakPtr< ImageDecoder > | image_decoder |
| The image decoder. | |
| fml::TaskRunnerAffineWeakPtr< ImageGeneratorRegistry > | image_generator_registry |
| std::string | advisory_script_uri |
| std::string | advisory_script_entrypoint |
| bool | deterministic_rendering_enabled = false |
| Whether deterministic rendering practices should be used. | |
| std::shared_ptr< fml::ConcurrentTaskRunner > | concurrent_task_runner |
| std::shared_future< impeller::RuntimeStageBackend > | runtime_stage_backend |
| The runtime stage backend for fragment shaders. | |
| bool | enable_impeller = false |
| Whether Impeller is enabled or not. | |
| bool | enable_flutter_gpu = false |
| Whether flutter_gpu is enabled or not. | |
The subset of state which is owned by the shell or engine and passed through the RuntimeController into DartIsolates. If a shell-owned resource needs to be exposed to the framework via UIDartState, a pointer to the resource can be added to this struct with appropriate default construction.
Definition at line 46 of file ui_dart_state.h.
|
explicit |
Definition at line 19 of file ui_dart_state.cc.
| flutter::UIDartState::Context::Context | ( | const TaskRunners & | task_runners, |
| fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > | snapshot_delegate, | ||
| fml::WeakPtr< IOManager > | io_manager, | ||
| fml::RefPtr< SkiaUnrefQueue > | unref_queue, | ||
| fml::TaskRunnerAffineWeakPtr< ImageDecoder > | image_decoder, | ||
| fml::TaskRunnerAffineWeakPtr< ImageGeneratorRegistry > | image_generator_registry, | ||
| std::string | advisory_script_uri, | ||
| std::string | advisory_script_entrypoint, | ||
| bool | deterministic_rendering_enabled, | ||
| std::shared_ptr< fml::ConcurrentTaskRunner > | concurrent_task_runner, | ||
| std::shared_future< impeller::RuntimeStageBackend > | runtime_stage_backend, | ||
| bool | enable_impeller, | ||
| bool | enable_flutter_gpu | ||
| ) |
Definition at line 22 of file ui_dart_state.cc.
| std::string flutter::UIDartState::Context::advisory_script_entrypoint |
The advisory script entrypoint (only used for debugging). This does not affect the code being run in the isolate in any way. The isolate must be transitioned to the running state explicitly by the caller.
Definition at line 98 of file ui_dart_state.h.
Referenced by flutter::testing::CreateAndRunRootIsolate(), flutter::DartIsolate::CreatePlatformIsolate(), flutter::testing::RunDartCodeInIsolateOnUITaskRunner(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::PlatformIsolateManagerTest::TestWithRootIsolate().
| std::string flutter::UIDartState::Context::advisory_script_uri |
The advisory script URI (only used for debugging). This does not affect the code being run in the isolate in any way.
Definition at line 93 of file ui_dart_state.h.
Referenced by flutter::testing::CreateAndRunRootIsolate(), flutter::DartIsolate::CreatePlatformIsolate(), flutter::UIDartState::GetAdvisoryScriptURI(), flutter::testing::RunDartCodeInIsolateOnUITaskRunner(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::PlatformIsolateManagerTest::TestWithRootIsolate().
| std::shared_ptr<fml::ConcurrentTaskRunner> flutter::UIDartState::Context::concurrent_task_runner |
The task runner whose tasks may be executed concurrently on a pool of shared worker threads.
Definition at line 105 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetConcurrentTaskRunner(), and flutter::RuntimeController::Spawn().
| bool flutter::UIDartState::Context::deterministic_rendering_enabled = false |
Whether deterministic rendering practices should be used.
Definition at line 101 of file ui_dart_state.h.
Referenced by flutter::UIDartState::IsDeterministicRenderingEnabled(), and flutter::RuntimeController::Spawn().
| bool flutter::UIDartState::Context::enable_flutter_gpu = false |
Whether flutter_gpu is enabled or not.
Definition at line 114 of file ui_dart_state.h.
Referenced by flutter::UIDartState::IsFlutterGPUEnabled(), and flutter::RuntimeController::Spawn().
| bool flutter::UIDartState::Context::enable_impeller = false |
Whether Impeller is enabled or not.
Definition at line 111 of file ui_dart_state.h.
Referenced by flutter::UIDartState::IsFlutterGPUEnabled(), flutter::UIDartState::IsImpellerEnabled(), flutter::testing::RunDartCodeInIsolateOnUITaskRunner(), and flutter::RuntimeController::Spawn().
| fml::TaskRunnerAffineWeakPtr<ImageDecoder> flutter::UIDartState::Context::image_decoder |
The image decoder.
Definition at line 83 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetImageDecoder().
| fml::TaskRunnerAffineWeakPtr<ImageGeneratorRegistry> flutter::UIDartState::Context::image_generator_registry |
Cascading registry of image generator builders. Given compressed image bytes as input, this is used to find and create image generators, which can then be used for image decoding.
Definition at line 89 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetImageGeneratorRegistry().
| fml::WeakPtr<IOManager> flutter::UIDartState::Context::io_manager |
The IO manager used by the isolate for asynchronous texture uploads.
Definition at line 76 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetIOManager(), flutter::RuntimeController::GetIOManager(), and flutter::testing::RunDartCodeInIsolateOnUITaskRunner().
| std::shared_future<impeller::RuntimeStageBackend> flutter::UIDartState::Context::runtime_stage_backend |
The runtime stage backend for fragment shaders.
Definition at line 108 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetRuntimeStageBackend(), and flutter::RuntimeController::Spawn().
| fml::TaskRunnerAffineWeakPtr<SnapshotDelegate> flutter::UIDartState::Context::snapshot_delegate |
The snapshot delegate used by the isolate to gather raster snapshots of Flutter view hierarchies.
Definition at line 73 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetSnapshotDelegate(), and flutter::RuntimeController::GetSnapshotDelegate().
| const TaskRunners flutter::UIDartState::Context::task_runners |
The task runners used by the shell hosting this runtime controller. This may be used by the isolate to scheduled asynchronous texture uploads or post tasks to the platform task runner.
Definition at line 68 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetTaskRunners(), flutter::testing::RunDartCodeInIsolateOnUITaskRunner(), and flutter::RuntimeController::Spawn().
| fml::RefPtr<SkiaUnrefQueue> flutter::UIDartState::Context::unref_queue |
The unref queue used by the isolate to collect resources that may reference resources on the GPU.
Definition at line 80 of file ui_dart_state.h.
Referenced by flutter::UIDartState::GetSkiaUnrefQueue(), flutter::RuntimeController::GetSkiaUnrefQueue(), and flutter::RuntimeController::Spawn().