Flutter Engine
flutter::Settings Struct Reference

#include <settings.h>

Public Member Functions

 Settings ()
 
 Settings (const Settings &other)
 
 ~Settings ()
 
std::string ToString () const
 

Public Attributes

std::string vm_snapshot_data_path
 
MappingCallback vm_snapshot_data
 
std::string vm_snapshot_instr_path
 
MappingCallback vm_snapshot_instr
 
std::string isolate_snapshot_data_path
 
MappingCallback isolate_snapshot_data
 
std::string isolate_snapshot_instr_path
 
MappingCallback isolate_snapshot_instr
 
MappingCallback dart_library_sources_kernel
 
std::vector< std::string > application_library_path
 
std::string application_kernel_asset
 
std::string application_kernel_list_asset
 
MappingsCallback application_kernels
 
std::string temp_directory_path
 
std::vector< std::string > dart_flags
 
std::vector< std::string > dart_entrypoint_args
 
bool enable_checked_mode = false
 
bool start_paused = false
 
bool trace_skia = false
 
std::string trace_allowlist
 
bool trace_startup = false
 
bool trace_systrace = false
 
bool dump_skp_on_shader_compilation = false
 
bool cache_sksl = false
 
bool purge_persistent_cache = false
 
bool endless_trace_buffer = false
 
bool enable_dart_profiling = false
 
bool disable_dart_asserts = false
 
bool may_insecurely_connect_to_all_domains = true
 
std::string domain_network_policy
 
std::string advisory_script_uri = "main.dart"
 
std::string advisory_script_entrypoint = "main"
 
bool enable_observatory = false
 
bool enable_observatory_publication = true
 
std::string observatory_host
 
uint32_t observatory_port = 0
 
bool disable_service_auth_codes = true
 
bool enable_service_port_fallback = false
 
bool use_test_fonts = false
 
bool leak_vm = true
 
TaskObserverAdd task_observer_add
 
TaskObserverRemove task_observer_remove
 
std::function< void(const DartIsolate &)> root_isolate_create_callback
 
fml::closure isolate_create_callback
 
fml::closure root_isolate_shutdown_callback
 
fml::closure isolate_shutdown_callback
 
fml::closure service_isolate_create_callback
 
std::function< void(int64_t)> idle_notification_callback
 
UnhandledExceptionCallback unhandled_exception_callback
 
bool enable_software_rendering = false
 
bool skia_deterministic_rendering_on_cpu = false
 
bool verbose_logging = false
 
std::string log_tag = "flutter"
 
bool icu_initialization_required = true
 
std::string icu_data_path
 
MappingCallback icu_mapper
 
fml::UniqueFD::element_type assets_dir
 
std::string assets_path
 
FrameRasterizedCallback frame_rasterized_callback
 
std::shared_ptr< const fml::Mappingpersistent_isolate_data
 
int64_t old_gen_heap_size = -1
 
std::chrono::microseconds engine_start_timestamp = {}
 

Detailed Description

Definition at line 64 of file settings.h.

Constructor & Destructor Documentation

◆ Settings() [1/2]

flutter::Settings::Settings ( )
default

◆ Settings() [2/2]

flutter::Settings::Settings ( const Settings other)
default

◆ ~Settings()

flutter::Settings::~Settings ( )
default

Member Function Documentation

◆ ToString()

std::string flutter::Settings::ToString ( ) const

Definition at line 19 of file settings.cc.

References application_library_path, assets_dir, assets_path, cache_sksl, dart_flags, disable_dart_asserts, dump_skp_on_shader_compilation, enable_dart_profiling, enable_observatory, enable_observatory_publication, enable_software_rendering, endless_trace_buffer, frame_rasterized_callback, icu_data_path, icu_initialization_required, isolate_snapshot_data_path, isolate_snapshot_instr_path, log_tag, observatory_host, observatory_port, old_gen_heap_size, flutter::path, purge_persistent_cache, start_paused, temp_directory_path, trace_skia, trace_startup, trace_systrace, use_test_fonts, vm_snapshot_data_path, and vm_snapshot_instr_path.

19  {
20  std::stringstream stream;
21  stream << "Settings: " << std::endl;
22  stream << "vm_snapshot_data_path: " << vm_snapshot_data_path << std::endl;
23  stream << "vm_snapshot_instr_path: " << vm_snapshot_instr_path << std::endl;
24  stream << "isolate_snapshot_data_path: " << isolate_snapshot_data_path
25  << std::endl;
26  stream << "isolate_snapshot_instr_path: " << isolate_snapshot_instr_path
27  << std::endl;
28  stream << "application_library_path:" << std::endl;
29  for (const auto& path : application_library_path) {
30  stream << " " << path << std::endl;
31  }
32  stream << "temp_directory_path: " << temp_directory_path << std::endl;
33  stream << "dart_flags:" << std::endl;
34  for (const auto& dart_flag : dart_flags) {
35  stream << " " << dart_flag << std::endl;
36  }
37  stream << "start_paused: " << start_paused << std::endl;
38  stream << "trace_skia: " << trace_skia << std::endl;
39  stream << "trace_startup: " << trace_startup << std::endl;
40  stream << "trace_systrace: " << trace_systrace << std::endl;
41  stream << "dump_skp_on_shader_compilation: " << dump_skp_on_shader_compilation
42  << std::endl;
43  stream << "cache_sksl: " << cache_sksl << std::endl;
44  stream << "purge_persistent_cache: " << purge_persistent_cache << std::endl;
45  stream << "endless_trace_buffer: " << endless_trace_buffer << std::endl;
46  stream << "enable_dart_profiling: " << enable_dart_profiling << std::endl;
47  stream << "disable_dart_asserts: " << disable_dart_asserts << std::endl;
48  stream << "enable_observatory: " << enable_observatory << std::endl;
49  stream << "enable_observatory_publication: " << enable_observatory_publication
50  << std::endl;
51  stream << "observatory_host: " << observatory_host << std::endl;
52  stream << "observatory_port: " << observatory_port << std::endl;
53  stream << "use_test_fonts: " << use_test_fonts << std::endl;
54  stream << "enable_software_rendering: " << enable_software_rendering
55  << std::endl;
56  stream << "log_tag: " << log_tag << std::endl;
57  stream << "icu_initialization_required: " << icu_initialization_required
58  << std::endl;
59  stream << "icu_data_path: " << icu_data_path << std::endl;
60  stream << "assets_dir: " << assets_dir << std::endl;
61  stream << "assets_path: " << assets_path << std::endl;
62  stream << "frame_rasterized_callback set: " << !!frame_rasterized_callback
63  << std::endl;
64  stream << "old_gen_heap_size: " << old_gen_heap_size << std::endl;
65  return stream.str();
66 }
DEF_SWITCHES_START snapshot asset path
Definition: switches.h:32
fml::UniqueFD::element_type assets_dir
Definition: settings.h:215
std::string temp_directory_path
Definition: settings.h:95
std::string isolate_snapshot_instr_path
Definition: settings.h:79
bool endless_trace_buffer
Definition: settings.h:110
int64_t old_gen_heap_size
Definition: settings.h:236
uint32_t observatory_port
Definition: settings.h:142
std::string isolate_snapshot_data_path
Definition: settings.h:77
bool enable_dart_profiling
Definition: settings.h:111
bool enable_observatory_publication
Definition: settings.h:134
std::string observatory_host
Definition: settings.h:137
std::vector< std::string > dart_flags
Definition: settings.h:96
bool dump_skp_on_shader_compilation
Definition: settings.h:107
std::string icu_data_path
Definition: settings.h:211
std::vector< std::string > application_library_path
Definition: settings.h:89
bool enable_observatory
Definition: settings.h:129
bool disable_dart_asserts
Definition: settings.h:112
std::string vm_snapshot_data_path
Definition: settings.h:72
bool icu_initialization_required
Definition: settings.h:210
std::string vm_snapshot_instr_path
Definition: settings.h:74
std::string assets_path
Definition: settings.h:217
bool enable_software_rendering
Definition: settings.h:201
std::string log_tag
Definition: settings.h:204
bool purge_persistent_cache
Definition: settings.h:109
FrameRasterizedCallback frame_rasterized_callback
Definition: settings.h:221

Member Data Documentation

◆ advisory_script_entrypoint

std::string flutter::Settings::advisory_script_entrypoint = "main"

Definition at line 124 of file settings.h.

Referenced by flutter::Engine::Engine(), and flutter_runner::MakeDataFileMapping().

◆ advisory_script_uri

std::string flutter::Settings::advisory_script_uri = "main.dart"

Definition at line 121 of file settings.h.

Referenced by flutter::Engine::Engine(), and flutter_runner::MakeDataFileMapping().

◆ application_kernel_asset

std::string flutter::Settings::application_kernel_asset

◆ application_kernel_list_asset

std::string flutter::Settings::application_kernel_list_asset

◆ application_kernels

◆ application_library_path

std::vector<std::string> flutter::Settings::application_library_path

◆ assets_dir

◆ assets_path

std::string flutter::Settings::assets_path

◆ cache_sksl

bool flutter::Settings::cache_sksl = false

Definition at line 108 of file settings.h.

Referenced by flutter::Shell::Create(), flutter::SettingsFromCommandLine(), and ToString().

◆ dart_entrypoint_args

std::vector<std::string> flutter::Settings::dart_entrypoint_args

◆ dart_flags

std::vector<std::string> flutter::Settings::dart_flags

◆ dart_library_sources_kernel

MappingCallback flutter::Settings::dart_library_sources_kernel

Definition at line 84 of file settings.h.

Referenced by PopulateSnapshotMappingCallbacks().

◆ disable_dart_asserts

bool flutter::Settings::disable_dart_asserts = false

◆ disable_service_auth_codes

bool flutter::Settings::disable_service_auth_codes = true

Definition at line 146 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and flutter::DartIsolate::Shutdown().

◆ domain_network_policy

std::string flutter::Settings::domain_network_policy

◆ dump_skp_on_shader_compilation

bool flutter::Settings::dump_skp_on_shader_compilation = false

Definition at line 107 of file settings.h.

Referenced by flutter::Shell::IsSetup(), flutter::SettingsFromCommandLine(), and ToString().

◆ enable_checked_mode

bool flutter::Settings::enable_checked_mode = false

Definition at line 101 of file settings.h.

Referenced by flutter::SettingsFromCommandLine().

◆ enable_dart_profiling

bool flutter::Settings::enable_dart_profiling = false

Definition at line 111 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ enable_observatory

◆ enable_observatory_publication

bool flutter::Settings::enable_observatory_publication = true

Definition at line 134 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ enable_service_port_fallback

bool flutter::Settings::enable_service_port_fallback = false

Definition at line 150 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and flutter::DartIsolate::Shutdown().

◆ enable_software_rendering

bool flutter::Settings::enable_software_rendering = false

◆ endless_trace_buffer

bool flutter::Settings::endless_trace_buffer = false

Definition at line 110 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ engine_start_timestamp

std::chrono::microseconds flutter::Settings::engine_start_timestamp = {}

A timestamp representing when the engine started. The value is based on the clock used by the Dart timeline APIs. This timestamp is used to log a timeline event that tracks the latency of engine startup.

Definition at line 241 of file settings.h.

Referenced by flutter::PerformInitializationTasks().

◆ frame_rasterized_callback

FrameRasterizedCallback flutter::Settings::frame_rasterized_callback

Definition at line 221 of file settings.h.

Referenced by flutter::Shell::GetDartVM(), and ToString().

◆ icu_data_path

std::string flutter::Settings::icu_data_path

◆ icu_initialization_required

bool flutter::Settings::icu_initialization_required = true

◆ icu_mapper

MappingCallback flutter::Settings::icu_mapper

◆ idle_notification_callback

std::function<void(int64_t)> flutter::Settings::idle_notification_callback

Definition at line 195 of file settings.h.

Referenced by flutter::Engine::Engine().

◆ isolate_create_callback

◆ isolate_shutdown_callback

fml::closure flutter::Settings::isolate_shutdown_callback

◆ isolate_snapshot_data

◆ isolate_snapshot_data_path

std::string flutter::Settings::isolate_snapshot_data_path

◆ isolate_snapshot_instr

◆ isolate_snapshot_instr_path

std::string flutter::Settings::isolate_snapshot_instr_path

◆ leak_vm

◆ log_tag

std::string flutter::Settings::log_tag = "flutter"

◆ may_insecurely_connect_to_all_domains

bool flutter::Settings::may_insecurely_connect_to_all_domains = true

◆ observatory_host

std::string flutter::Settings::observatory_host

◆ observatory_port

uint32_t flutter::Settings::observatory_port = 0

◆ old_gen_heap_size

int64_t flutter::Settings::old_gen_heap_size = -1

Max size of old gen heap size in MB, or 0 for unlimited, -1 for default value.

See also: https://github.com/dart-lang/sdk/blob/ca64509108b3e7219c50d6c52877c85ab6a35ff2/runtime/vm/flag_list.h#L150

Definition at line 236 of file settings.h.

Referenced by FlutterEngineInitialize(), and ToString().

◆ persistent_isolate_data

std::shared_ptr<const fml::Mapping> flutter::Settings::persistent_isolate_data

Definition at line 229 of file settings.h.

Referenced by flutter::Engine::Engine(), and flutter::testing::TEST_F().

◆ purge_persistent_cache

bool flutter::Settings::purge_persistent_cache = false

Definition at line 109 of file settings.h.

Referenced by flutter::Shell::IsSetup(), flutter::SettingsFromCommandLine(), and ToString().

◆ root_isolate_create_callback

std::function<void(const DartIsolate&)> flutter::Settings::root_isolate_create_callback

◆ root_isolate_shutdown_callback

fml::closure flutter::Settings::root_isolate_shutdown_callback

◆ service_isolate_create_callback

fml::closure flutter::Settings::service_isolate_create_callback

Definition at line 189 of file settings.h.

◆ skia_deterministic_rendering_on_cpu

bool flutter::Settings::skia_deterministic_rendering_on_cpu = false

◆ start_paused

bool flutter::Settings::start_paused = false

Definition at line 102 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ task_observer_add

◆ task_observer_remove

◆ temp_directory_path

std::string flutter::Settings::temp_directory_path

Definition at line 95 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ trace_allowlist

std::string flutter::Settings::trace_allowlist

◆ trace_skia

bool flutter::Settings::trace_skia = false

◆ trace_startup

bool flutter::Settings::trace_startup = false

Definition at line 105 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ trace_systrace

bool flutter::Settings::trace_systrace = false

Definition at line 106 of file settings.h.

Referenced by flutter::SettingsFromCommandLine(), and ToString().

◆ unhandled_exception_callback

UnhandledExceptionCallback flutter::Settings::unhandled_exception_callback

◆ use_test_fonts

bool flutter::Settings::use_test_fonts = false

◆ verbose_logging

◆ vm_snapshot_data

◆ vm_snapshot_data_path

std::string flutter::Settings::vm_snapshot_data_path

Definition at line 72 of file settings.h.

Referenced by flutter::ResolveVMData(), flutter::SettingsFromCommandLine(), and ToString().

◆ vm_snapshot_instr

◆ vm_snapshot_instr_path

std::string flutter::Settings::vm_snapshot_instr_path

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