Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
flutter::UIDartState::Context Struct Reference

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::WeakPtr< ImageDecoder > image_decoder, fml::WeakPtr< ImageGeneratorRegistry > image_generator_registry, std::string advisory_script_uri, std::string advisory_script_entrypoint, std::shared_ptr< VolatilePathTracker > volatile_path_tracker, std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner, bool enable_impeller, impeller::RuntimeStageBackend runtime_stage_backend)
 

Public Attributes

const TaskRunners task_runners
 
fml::TaskRunnerAffineWeakPtr< SnapshotDelegatesnapshot_delegate
 
fml::WeakPtr< IOManagerio_manager
 The IO manager used by the isolate for asynchronous texture uploads.
 
fml::RefPtr< SkiaUnrefQueueunref_queue
 
fml::WeakPtr< ImageDecoderimage_decoder
 The image decoder.
 
fml::WeakPtr< ImageGeneratorRegistryimage_generator_registry
 
std::string advisory_script_uri
 
std::string advisory_script_entrypoint
 
std::shared_ptr< VolatilePathTrackervolatile_path_tracker
 Cache for tracking path volatility.
 
std::shared_ptr< fml::ConcurrentTaskRunnerconcurrent_task_runner
 
bool enable_impeller = false
 Whether Impeller is enabled or not.
 
impeller::RuntimeStageBackend runtime_stage_backend
 The expected backend for runtime stage shaders.
 

Detailed Description

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 45 of file ui_dart_state.h.

Constructor & Destructor Documentation

◆ Context() [1/2]

flutter::UIDartState::Context::Context ( const TaskRunners task_runners)
explicit

Definition at line 29 of file ui_dart_state.cc.

◆ Context() [2/2]

flutter::UIDartState::Context::Context ( const TaskRunners task_runners,
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate snapshot_delegate,
fml::WeakPtr< IOManager io_manager,
fml::RefPtr< SkiaUnrefQueue unref_queue,
fml::WeakPtr< ImageDecoder image_decoder,
fml::WeakPtr< ImageGeneratorRegistry image_generator_registry,
std::string  advisory_script_uri,
std::string  advisory_script_entrypoint,
std::shared_ptr< VolatilePathTracker volatile_path_tracker,
std::shared_ptr< fml::ConcurrentTaskRunner concurrent_task_runner,
bool  enable_impeller,
impeller::RuntimeStageBackend  runtime_stage_backend 
)

Definition at line 32 of file ui_dart_state.cc.

47 io_manager(std::move(io_manager)),
48 unref_queue(std::move(unref_queue)),
49 image_decoder(std::move(image_decoder)),
fml::RefPtr< SkiaUnrefQueue > unref_queue
fml::WeakPtr< ImageGeneratorRegistry > image_generator_registry
fml::WeakPtr< IOManager > io_manager
The IO manager used by the isolate for asynchronous texture uploads.
std::shared_ptr< VolatilePathTracker > volatile_path_tracker
Cache for tracking path volatility.
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate
bool enable_impeller
Whether Impeller is enabled or not.
impeller::RuntimeStageBackend runtime_stage_backend
The expected backend for runtime stage shaders.
fml::WeakPtr< ImageDecoder > image_decoder
The image decoder.
std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner

Member Data Documentation

◆ advisory_script_entrypoint

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 93 of file ui_dart_state.h.

◆ advisory_script_uri

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 88 of file ui_dart_state.h.

◆ concurrent_task_runner

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 100 of file ui_dart_state.h.

◆ enable_impeller

bool flutter::UIDartState::Context::enable_impeller = false

Whether Impeller is enabled or not.

Definition at line 103 of file ui_dart_state.h.

◆ image_decoder

fml::WeakPtr<ImageDecoder> flutter::UIDartState::Context::image_decoder

The image decoder.

Definition at line 79 of file ui_dart_state.h.

◆ image_generator_registry

fml::WeakPtr<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 84 of file ui_dart_state.h.

◆ io_manager

fml::WeakPtr<IOManager> flutter::UIDartState::Context::io_manager

The IO manager used by the isolate for asynchronous texture uploads.

Definition at line 72 of file ui_dart_state.h.

◆ runtime_stage_backend

impeller::RuntimeStageBackend flutter::UIDartState::Context::runtime_stage_backend

The expected backend for runtime stage shaders.

Definition at line 106 of file ui_dart_state.h.

◆ snapshot_delegate

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 69 of file ui_dart_state.h.

◆ task_runners

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 64 of file ui_dart_state.h.

◆ unref_queue

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 76 of file ui_dart_state.h.

◆ volatile_path_tracker

std::shared_ptr<VolatilePathTracker> flutter::UIDartState::Context::volatile_path_tracker

Cache for tracking path volatility.

Definition at line 96 of file ui_dart_state.h.


The documentation for this struct was generated from the following files: