Flutter Engine
 
Loading...
Searching...
No Matches
flutter::DartProject Class Reference

#include <dart_project.h>

Public Member Functions

 DartProject (const std::wstring &assets_path, const std::wstring &icu_data_path, const std::wstring &aot_library_path)
 
 DartProject (const std::wstring &path)
 
 ~DartProject ()=default
 
void set_dart_entrypoint (const std::string &entrypoint)
 
const std::string & dart_entrypoint () const
 
void set_dart_entrypoint_arguments (std::vector< std::string > arguments)
 
const std::vector< std::string > & dart_entrypoint_arguments () const
 
void set_gpu_preference (GpuPreference gpu_preference)
 
GpuPreference gpu_preference () const
 
void set_ui_thread_policy (UIThreadPolicy policy)
 
UIThreadPolicy ui_thread_policy () const
 

Friends

class FlutterEngine
 
class FlutterViewController
 
class DartProjectTest
 

Detailed Description

Definition at line 35 of file dart_project.h.

Constructor & Destructor Documentation

◆ DartProject() [1/2]

flutter::DartProject::DartProject ( const std::wstring &  assets_path,
const std::wstring &  icu_data_path,
const std::wstring &  aot_library_path 
)
inlineexplicit

Definition at line 45 of file dart_project.h.

47 {
48 assets_path_ = assets_path;
49 icu_data_path_ = icu_data_path;
50 aot_library_path_ = aot_library_path;
51 }

◆ DartProject() [2/2]

flutter::DartProject::DartProject ( const std::wstring &  path)
inlineexplicit

Definition at line 61 of file dart_project.h.

61 {
62 assets_path_ = path + L"\\flutter_assets";
63 icu_data_path_ = path + L"\\icudtl.dat";
64 aot_library_path_ = path + L"\\app.so";
65 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switch_defs.h:52

References flutter::path.

◆ ~DartProject()

flutter::DartProject::~DartProject ( )
default

Member Function Documentation

◆ dart_entrypoint()

const std::string & flutter::DartProject::dart_entrypoint ( ) const
inline

Definition at line 81 of file dart_project.h.

81{ return dart_entrypoint_; }

Referenced by flutter::FlutterEngine::FlutterEngine().

◆ dart_entrypoint_arguments()

const std::vector< std::string > & flutter::DartProject::dart_entrypoint_arguments ( ) const
inline

Definition at line 91 of file dart_project.h.

91 {
92 return dart_entrypoint_arguments_;
93 }

Referenced by flutter::FlutterEngine::FlutterEngine(), and flutter::TEST_F().

◆ gpu_preference()

GpuPreference flutter::DartProject::gpu_preference ( ) const
inline

Definition at line 102 of file dart_project.h.

102{ return gpu_preference_; }

Referenced by flutter::FlutterEngine::FlutterEngine(), and set_gpu_preference().

◆ set_dart_entrypoint()

void flutter::DartProject::set_dart_entrypoint ( const std::string &  entrypoint)
inline

Definition at line 73 of file dart_project.h.

73 {
74 if (entrypoint.empty()) {
75 return;
76 }
77 dart_entrypoint_ = entrypoint;
78 }

Referenced by flutter::TEST().

◆ set_dart_entrypoint_arguments()

void flutter::DartProject::set_dart_entrypoint_arguments ( std::vector< std::string >  arguments)
inline

Definition at line 85 of file dart_project.h.

85 {
86 dart_entrypoint_arguments_ = std::move(arguments);
87 }

Referenced by flutter::TEST(), and flutter::TEST_F().

◆ set_gpu_preference()

void flutter::DartProject::set_gpu_preference ( GpuPreference  gpu_preference)
inline

Definition at line 96 of file dart_project.h.

96 {
97 gpu_preference_ = gpu_preference;
98 }
GpuPreference gpu_preference() const

References gpu_preference().

◆ set_ui_thread_policy()

void flutter::DartProject::set_ui_thread_policy ( UIThreadPolicy  policy)
inline

Definition at line 105 of file dart_project.h.

105 {
106 ui_thread_policy_ = policy;
107 }
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network policy

References flutter::policy.

◆ ui_thread_policy()

UIThreadPolicy flutter::DartProject::ui_thread_policy ( ) const
inline

Definition at line 111 of file dart_project.h.

111{ return ui_thread_policy_; }

Referenced by flutter::FlutterEngine::FlutterEngine().

Friends And Related Symbol Documentation

◆ DartProjectTest

friend class DartProjectTest
friend

Definition at line 120 of file dart_project.h.

◆ FlutterEngine

friend class FlutterEngine
friend

Definition at line 118 of file dart_project.h.

◆ FlutterViewController

friend class FlutterViewController
friend

Definition at line 119 of file dart_project.h.


The documentation for this class was generated from the following file: