#include <embedder_engine.h>
|
| EmbedderEngine (std::unique_ptr< EmbedderThreadHost > thread_host, const TaskRunners &task_runners, const Settings &settings, RunConfiguration run_configuration, const Shell::CreateCallback< PlatformView > &on_create_platform_view, const Shell::CreateCallback< Rasterizer > &on_create_rasterizer, std::unique_ptr< EmbedderExternalTextureResolver > external_texture_resolver) |
|
| ~EmbedderEngine () |
|
bool | LaunchShell () |
|
bool | CollectShell () |
|
const TaskRunners & | GetTaskRunners () const |
|
bool | NotifyCreated () |
|
bool | NotifyDestroyed () |
|
bool | RunRootIsolate () |
|
bool | IsValid () const |
|
bool | SetViewportMetrics (int64_t view_id, const flutter::ViewportMetrics &metrics) |
|
bool | DispatchPointerDataPacket (std::unique_ptr< flutter::PointerDataPacket > packet) |
|
bool | SendPlatformMessage (std::unique_ptr< PlatformMessage > message) |
|
bool | RegisterTexture (int64_t texture) |
|
bool | UnregisterTexture (int64_t texture) |
|
bool | MarkTextureFrameAvailable (int64_t texture) |
|
bool | SetSemanticsEnabled (bool enabled) |
|
bool | SetAccessibilityFeatures (int32_t flags) |
|
bool | DispatchSemanticsAction (int node_id, flutter::SemanticsAction action, fml::MallocMapping args) |
|
bool | OnVsyncEvent (intptr_t baton, fml::TimePoint frame_start_time, fml::TimePoint frame_target_time) |
|
bool | ReloadSystemFonts () |
|
bool | PostRenderThreadTask (const fml::closure &task) |
|
bool | RunTask (const FlutterTask *task) |
|
bool | PostTaskOnEngineManagedNativeThreads (const std::function< void(FlutterNativeThreadType)> &closure) const |
|
bool | ScheduleFrame () |
|
Shell & | GetShell () |
|
Definition at line 23 of file embedder_engine.h.
◆ EmbedderEngine()
Definition at line 24 of file embedder_engine.cc.
32 : thread_host_(std::move(thread_host)),
33 task_runners_(task_runners),
34 run_configuration_(std::move(run_configuration)),
35 shell_args_(std::make_unique<ShellArgs>(
settings,
36 on_create_platform_view,
37 on_create_rasterizer)),
38 external_texture_resolver_(std::move(external_texture_resolver)) {}
◆ ~EmbedderEngine()
flutter::EmbedderEngine::~EmbedderEngine |
( |
| ) |
|
|
default |
◆ CollectShell()
bool flutter::EmbedderEngine::CollectShell |
( |
| ) |
|
◆ DispatchPointerDataPacket()
Definition at line 117 of file embedder_engine.cc.
118 {
120 return false;
121 }
122
125 return false;
126 }
127
129 return true;
130}
◆ DispatchSemanticsAction()
Definition at line 197 of file embedder_engine.cc.
199 {
201 return false;
202 }
205 return false;
206 }
208 return true;
209}
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
◆ GetShell()
Shell & flutter::EmbedderEngine::GetShell |
( |
| ) |
|
Definition at line 292 of file embedder_engine.cc.
292 {
294 return *shell_.get();
295}
#define FML_DCHECK(condition)
◆ GetTaskRunners()
const TaskRunners & flutter::EmbedderEngine::GetTaskRunners |
( |
| ) |
const |
◆ IsValid()
bool flutter::EmbedderEngine::IsValid |
( |
| ) |
const |
◆ LaunchShell()
bool flutter::EmbedderEngine::LaunchShell |
( |
| ) |
|
Definition at line 42 of file embedder_engine.cc.
42 {
43 if (!shell_args_) {
45 return false;
46 }
47
48 if (shell_) {
50 }
51
54 shell_args_->on_create_platform_view, shell_args_->on_create_rasterizer);
55
56
57
58 shell_args_.reset();
59
61}
static std::unique_ptr< Shell > Create(const PlatformData &platform_data, const TaskRunners &task_runners, Settings settings, const CreateCallback< PlatformView > &on_create_platform_view, const CreateCallback< Rasterizer > &on_create_rasterizer, bool is_gpu_disabled=false)
Creates a shell instance using the provided settings. The callbacks to create the various shell subco...
#define FML_DLOG(severity)
◆ MarkTextureFrameAvailable()
bool flutter::EmbedderEngine::MarkTextureFrameAvailable |
( |
int64_t |
texture | ) |
|
Definition at line 164 of file embedder_engine.cc.
164 {
166 return false;
167 }
168 shell_->GetPlatformView()->MarkTextureFrameAvailable(
texture);
169 return true;
170}
◆ NotifyCreated()
bool flutter::EmbedderEngine::NotifyCreated |
( |
| ) |
|
Definition at line 84 of file embedder_engine.cc.
84 {
86 return false;
87 }
88
89 shell_->GetPlatformView()->NotifyCreated();
90 return true;
91}
◆ NotifyDestroyed()
bool flutter::EmbedderEngine::NotifyDestroyed |
( |
| ) |
|
Definition at line 93 of file embedder_engine.cc.
93 {
95 return false;
96 }
97
98 shell_->GetPlatformView()->NotifyDestroyed();
99 return true;
100}
◆ OnVsyncEvent()
Definition at line 211 of file embedder_engine.cc.
213 {
215 return false;
216 }
217
219 task_runners_, baton, frame_start_time, frame_target_time);
220}
static bool OnEmbedderVsync(const flutter::TaskRunners &task_runners, intptr_t baton, fml::TimePoint frame_start_time, fml::TimePoint frame_target_time)
◆ PostRenderThreadTask()
bool flutter::EmbedderEngine::PostRenderThreadTask |
( |
const fml::closure & |
task | ) |
|
Definition at line 230 of file embedder_engine.cc.
230 {
232 return false;
233 }
234
235 shell_->GetTaskRunners().GetRasterTaskRunner()->PostTask(task);
236 return true;
237}
◆ PostTaskOnEngineManagedNativeThreads()
Definition at line 250 of file embedder_engine.cc.
251 {
253 return false;
254 }
255
256 const auto trampoline = [
closure](
260 };
261
262
263 const auto& task_runners = shell_->GetTaskRunners();
265 task_runners.GetRasterTaskRunner());
269 task_runners.GetPlatformTaskRunner());
270
271
272 auto vm = shell_->GetDartVM();
273 vm->GetConcurrentMessageLoop()->PostTaskToAllWorkers(
275
276 return true;
277}
@ kFlutterNativeThreadTypeWorker
@ kFlutterNativeThreadTypeUI
@ kFlutterNativeThreadTypePlatform
@ kFlutterNativeThreadTypeRender
std::function< void()> closure
◆ RegisterTexture()
bool flutter::EmbedderEngine::RegisterTexture |
( |
int64_t |
texture | ) |
|
Definition at line 147 of file embedder_engine.cc.
147 {
149 return false;
150 }
151 shell_->GetPlatformView()->RegisterTexture(
152 external_texture_resolver_->ResolveExternalTexture(
texture));
153 return true;
154}
◆ ReloadSystemFonts()
bool flutter::EmbedderEngine::ReloadSystemFonts |
( |
| ) |
|
Definition at line 222 of file embedder_engine.cc.
222 {
224 return false;
225 }
226
227 return shell_->ReloadSystemFonts();
228}
◆ RunRootIsolate()
bool flutter::EmbedderEngine::RunRootIsolate |
( |
| ) |
|
Definition at line 68 of file embedder_engine.cc.
68 {
70 return false;
71 }
72 shell_->RunEngine(std::move(run_configuration_));
73 return true;
74}
bool IsValid() const
A valid run configuration only guarantees that the engine should be able to find the assets and the i...
◆ RunTask()
bool flutter::EmbedderEngine::RunTask |
( |
const FlutterTask * |
task | ) |
|
Definition at line 239 of file embedder_engine.cc.
239 {
240
241
242
243 if (task == nullptr) {
244 return false;
245 }
246 return thread_host_->PostTask(
reinterpret_cast<int64_t
>(task->
runner),
248}
◆ ScheduleFrame()
bool flutter::EmbedderEngine::ScheduleFrame |
( |
| ) |
|
Definition at line 279 of file embedder_engine.cc.
279 {
281 return false;
282 }
283
286 return false;
287 }
289 return true;
290}
◆ SendPlatformMessage()
bool flutter::EmbedderEngine::SendPlatformMessage |
( |
std::unique_ptr< PlatformMessage > |
message | ) |
|
Definition at line 132 of file embedder_engine.cc.
133 {
135 return false;
136 }
137
140 return false;
141 }
142
144 return true;
145}
◆ SetAccessibilityFeatures()
bool flutter::EmbedderEngine::SetAccessibilityFeatures |
( |
int32_t |
flags | ) |
|
Definition at line 185 of file embedder_engine.cc.
185 {
187 return false;
188 }
191 return false;
192 }
194 return true;
195}
FlutterSemanticsFlag flags
◆ SetSemanticsEnabled()
bool flutter::EmbedderEngine::SetSemanticsEnabled |
( |
bool |
enabled | ) |
|
Definition at line 172 of file embedder_engine.cc.
172 {
174 return false;
175 }
176
179 return false;
180 }
182 return true;
183}
◆ SetViewportMetrics()
Definition at line 102 of file embedder_engine.cc.
104 {
106 return false;
107 }
108
111 return false;
112 }
114 return true;
115}
◆ UnregisterTexture()
bool flutter::EmbedderEngine::UnregisterTexture |
( |
int64_t |
texture | ) |
|
Definition at line 156 of file embedder_engine.cc.
156 {
158 return false;
159 }
160 shell_->GetPlatformView()->UnregisterTexture(
texture);
161 return true;
162}
The documentation for this class was generated from the following files: