5#ifndef FLUTTER_LIB_UI_UI_DART_STATE_H_
6#define FLUTTER_LIB_UI_UI_DART_STATE_H_
25#include "third_party/dart/runtime/include/dart_api.h"
26#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
33class ImageGeneratorRegistry;
34class PlatformConfiguration;
124 const std::string&
debug_name()
const {
return debug_name_; }
129 return platform_configuration_.get();
170 return unhandled_exception_callback_;
198 std::shared_ptr<IsolateNameServer> isolate_name_server,
199 bool is_root_isolate_,
210 void DidSetIsolate()
override;
214 std::optional<fml::TaskQueueId> callback_queue_id_;
215 const std::string logger_prefix_;
216 Dart_Port main_port_ = ILLEGAL_PORT;
217 const bool is_root_isolate_;
218 std::string debug_name_;
219 std::unique_ptr<PlatformConfiguration> platform_configuration_;
220 std::weak_ptr<PlatformMessageHandler> platform_message_handler_;
224 const std::shared_ptr<IsolateNameServer> isolate_name_server_;
227 void AddOrRemoveTaskObserver(
bool add);
fml::RefPtr< flutter::SkiaUnrefQueue > GetSkiaUnrefQueue() const
bool HasPendingMicrotasks()
std::shared_ptr< fml::ConcurrentTaskRunner > GetConcurrentTaskRunner() const
fml::TaskRunnerAffineWeakPtr< ImageGeneratorRegistry > GetImageGeneratorRegistry() const
Dart_Port main_port() const
PlatformConfiguration * platform_configuration() const
fml::TaskRunnerAffineWeakPtr< ImageDecoder > GetImageDecoder() const
UnhandledExceptionCallback unhandled_exception_callback() const
bool IsRootIsolate() const
bool IsFlutterGPUEnabled() const
Whether Flutter GPU is enabled for this application.
void FlushMicrotasksNow()
void SetPlatformConfiguration(std::unique_ptr< PlatformConfiguration > platform_configuration)
const std::string & logger_prefix() const
tonic::DartErrorHandleType GetLastError()
fml::WeakPtr< IOManager > GetIOManager() const
const TaskRunners & GetTaskRunners() const
bool IsDeterministicRenderingEnabled() const
Whether deterministic rendering practices are enabled for this application.
virtual Dart_Isolate CreatePlatformIsolate(Dart_Handle entry_point, char **error)
bool IsImpellerEnabled() const
Whether Impeller is enabled for this application.
std::shared_ptr< IsolateNameServer > GetIsolateNameServer() const
void SetDebugName(const std::string &name)
int64_t GetRootIsolateToken() const
void ScheduleMicrotask(Dart_Handle handle)
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > GetSnapshotDelegate() const
const std::string & GetAdvisoryScriptURI() const
impeller::RuntimeStageBackend GetRuntimeStageBackend() const
The runtime stage to use for fragment shaders.
void LogMessage(const std::string &tag, const std::string &message) const
void SetPlatformMessageHandler(std::weak_ptr< PlatformMessageHandler > handler)
static UIDartState * Current()
static void ThrowIfUIOperationsProhibited()
Dart_Handle HandlePlatformMessage(std::unique_ptr< PlatformMessage > message)
const std::string & debug_name() const
const gchar FlBinaryMessengerMessageHandler handler
G_BEGIN_DECLS GBytes * message
const uint8_t uint32_t uint32_t GError ** error
std::function< void(fml::TaskQueueId, intptr_t)> TaskObserverRemove
DEF_SWITCHES_START aot vmservice shared library name
std::function< fml::TaskQueueId(intptr_t, fml::closure)> TaskObserverAdd
std::function< bool(const std::string &, const std::string &)> UnhandledExceptionCallback
std::function< void(const std::string &, const std::string &)> LogMessageCallback
The subset of state which is owned by the shell or engine and passed through the RuntimeController in...
fml::RefPtr< SkiaUnrefQueue > unref_queue
bool enable_flutter_gpu
Whether flutter_gpu is enabled or not.
fml::WeakPtr< IOManager > io_manager
The IO manager used by the isolate for asynchronous texture uploads.
std::string advisory_script_uri
std::shared_future< impeller::RuntimeStageBackend > runtime_stage_backend
The runtime stage backend for fragment shaders.
const TaskRunners task_runners
fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > snapshot_delegate
bool enable_impeller
Whether Impeller is enabled or not.
fml::TaskRunnerAffineWeakPtr< ImageDecoder > image_decoder
The image decoder.
std::shared_ptr< fml::ConcurrentTaskRunner > concurrent_task_runner
bool deterministic_rendering_enabled
Whether deterministic rendering practices should be used.
fml::TaskRunnerAffineWeakPtr< ImageGeneratorRegistry > image_generator_registry
std::string advisory_script_entrypoint