Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
embedder_config_builder.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/shell/platform/embedder/tests/embedder_config_builder.h"
6
7#include "flutter/common/constants.h"
8#include "flutter/runtime/dart_vm.h"
9#include "flutter/shell/platform/embedder/embedder.h"
13
14#ifdef SHELL_ENABLE_GL
15#include "flutter/shell/platform/embedder/tests/embedder_test_compositor_gl.h"
16#include "flutter/shell/platform/embedder/tests/embedder_test_context_gl.h"
17#endif
18
19#ifdef SHELL_ENABLE_VULKAN
20#include "flutter/shell/platform/embedder/tests/embedder_test_context_vulkan.h"
21#include "flutter/vulkan/vulkan_device.h" // nogncheck
22#include "vulkan/vulkan_core.h" // nogncheck
23#endif
24
25#ifdef SHELL_ENABLE_METAL
26#include "flutter/shell/platform/embedder/tests/embedder_test_context_metal.h"
27#endif
28
29namespace flutter {
30namespace testing {
31
33 EmbedderTestContext& context,
34 InitializationPreference preference)
35 : context_(context) {
36 project_args_.struct_size = sizeof(project_args_);
37 project_args_.shutdown_dart_vm_when_done = true;
38 project_args_.platform_message_callback =
39 [](const FlutterPlatformMessage* message, void* context) {
40 reinterpret_cast<EmbedderTestContext*>(context)
41 ->PlatformMessageCallback(message);
42 };
43
44 custom_task_runners_.struct_size = sizeof(FlutterCustomTaskRunners);
45
46#ifdef SHELL_ENABLE_GL
47 opengl_renderer_config_.struct_size = sizeof(FlutterOpenGLRendererConfig);
48 opengl_renderer_config_.make_current = [](void* context) -> bool {
49 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLMakeCurrent();
50 };
51 opengl_renderer_config_.clear_current = [](void* context) -> bool {
52 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLClearCurrent();
53 };
54 opengl_renderer_config_.present_with_info =
55 [](void* context, const FlutterPresentInfo* present_info) -> bool {
56 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLPresent(
57 *present_info);
58 };
59 opengl_renderer_config_.fbo_with_frame_info_callback =
60 [](void* context, const FlutterFrameInfo* frame_info) -> uint32_t {
61 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLGetFramebuffer(
62 *frame_info);
63 };
64 opengl_renderer_config_.populate_existing_damage = nullptr;
65 opengl_renderer_config_.make_resource_current = [](void* context) -> bool {
66 return reinterpret_cast<EmbedderTestContextGL*>(context)
67 ->GLMakeResourceCurrent();
68 };
69 opengl_renderer_config_.gl_proc_resolver = [](void* context,
70 const char* name) -> void* {
71 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLGetProcAddress(
72 name);
73 };
74 opengl_renderer_config_.fbo_reset_after_present = true;
75 opengl_renderer_config_.surface_transformation =
76 [](void* context) -> FlutterTransformation {
77 return reinterpret_cast<EmbedderTestContext*>(context)
78 ->GetRootSurfaceTransformation();
79 };
80#endif
81
82#ifdef SHELL_ENABLE_METAL
83 InitializeMetalRendererConfig();
84#endif
85
86#ifdef SHELL_ENABLE_VULKAN
87 InitializeVulkanRendererConfig();
88#endif
89
90 software_renderer_config_.struct_size = sizeof(FlutterSoftwareRendererConfig);
91 software_renderer_config_.surface_present_callback =
92 [](void* context, const void* allocation, size_t row_bytes,
93 size_t height) {
94 auto image_info =
97 if (!bitmap.installPixels(image_info, const_cast<void*>(allocation),
98 row_bytes)) {
99 FML_LOG(ERROR) << "Could not copy pixels for the software "
100 "composition from the engine.";
101 return false;
102 }
103 bitmap.setImmutable();
104 return reinterpret_cast<EmbedderTestContextSoftware*>(context)->Present(
106 };
107
108 // The first argument is always the executable name. Don't make tests have to
109 // do this manually.
110 AddCommandLineArgument("embedder_unittest");
111
112 if (preference != InitializationPreference::kNoInitialize) {
119 AddCommandLineArgument("--disable-vm-service");
120
123 SetSnapshots();
124 }
128 }
129 }
130}
131
133
137
139 renderer_config_.type = FlutterRendererType::kSoftware;
140 renderer_config_.software = software_renderer_config_;
141 context_.SetupSurface(surface_size);
142}
143
145#ifdef SHELL_ENABLE_GL
146 // SetOpenGLRendererConfig must be called before this.
147 FML_CHECK(renderer_config_.type == FlutterRendererType::kOpenGL);
148 renderer_config_.open_gl.fbo_callback = [](void* context) -> uint32_t {
149 FlutterFrameInfo frame_info = {};
150 // fbo_callback doesn't use the frame size information, only
151 // fbo_callback_with_frame_info does.
152 frame_info.struct_size = sizeof(FlutterFrameInfo);
153 frame_info.size.width = 0;
154 frame_info.size.height = 0;
155 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLGetFramebuffer(
156 frame_info);
157 };
158#endif
159}
160
162#ifdef SHELL_ENABLE_GL
163 // SetOpenGLRendererConfig must be called before this.
164 FML_CHECK(renderer_config_.type == FlutterRendererType::kOpenGL);
165 renderer_config_.open_gl.present = [](void* context) -> bool {
166 // passing a placeholder fbo_id.
167 return reinterpret_cast<EmbedderTestContextGL*>(context)->GLPresent(
169 .fbo_id = 0,
170 });
171 };
172#endif
173}
174
176 SkISize surface_size) {
177 switch (type) {
179 SetOpenGLRendererConfig(surface_size);
180 break;
182 SetMetalRendererConfig(surface_size);
183 break;
185 SetVulkanRendererConfig(surface_size);
186 break;
188 SetSoftwareRendererConfig(surface_size);
189 break;
190 }
191}
192
194#ifdef SHELL_ENABLE_GL
195 renderer_config_.type = FlutterRendererType::kOpenGL;
196 renderer_config_.open_gl = opengl_renderer_config_;
197 context_.SetupSurface(surface_size);
198#endif
199}
200
202#ifdef SHELL_ENABLE_METAL
203 renderer_config_.type = FlutterRendererType::kMetal;
204 renderer_config_.metal = metal_renderer_config_;
205 context_.SetupSurface(surface_size);
206#endif
207}
208
210 SkISize surface_size,
211 std::optional<FlutterVulkanInstanceProcAddressCallback>
212 instance_proc_address_callback) {
213#ifdef SHELL_ENABLE_VULKAN
214 renderer_config_.type = FlutterRendererType::kVulkan;
215 FlutterVulkanRendererConfig vulkan_renderer_config = vulkan_renderer_config_;
216 if (instance_proc_address_callback.has_value()) {
217 vulkan_renderer_config.get_instance_proc_address_callback =
218 instance_proc_address_callback.value();
219 }
220 renderer_config_.vulkan = vulkan_renderer_config;
221 context_.SetupSurface(surface_size);
222#endif
223}
224
226 project_args_.assets_path = context_.GetAssetsPath().c_str();
227}
228
230 if (auto mapping = context_.GetVMSnapshotData()) {
231 project_args_.vm_snapshot_data = mapping->GetMapping();
232 project_args_.vm_snapshot_data_size = mapping->GetSize();
233 }
234
235 if (auto mapping = context_.GetVMSnapshotInstructions()) {
236 project_args_.vm_snapshot_instructions = mapping->GetMapping();
237 project_args_.vm_snapshot_instructions_size = mapping->GetSize();
238 }
239
240 if (auto mapping = context_.GetIsolateSnapshotData()) {
241 project_args_.isolate_snapshot_data = mapping->GetMapping();
242 project_args_.isolate_snapshot_data_size = mapping->GetSize();
243 }
244
245 if (auto mapping = context_.GetIsolateSnapshotInstructions()) {
246 project_args_.isolate_snapshot_instructions = mapping->GetMapping();
247 project_args_.isolate_snapshot_instructions_size = mapping->GetSize();
248 }
249}
250
252 project_args_.aot_data = context_.GetAOTData();
253}
254
259
270
275
280
281void EmbedderConfigBuilder::SetLogTag(std::string tag) {
282 log_tag_ = std::move(tag);
283 project_args_.log_tag = log_tag_.c_str();
284}
285
290
291void EmbedderConfigBuilder::SetExecutableName(std::string executable_name) {
292 if (executable_name.empty()) {
293 return;
294 }
295 command_line_arguments_[0] = std::move(executable_name);
296}
297
298void EmbedderConfigBuilder::SetDartEntrypoint(std::string entrypoint) {
299 if (entrypoint.empty()) {
300 return;
301 }
302
303 dart_entrypoint_ = std::move(entrypoint);
304 project_args_.custom_dart_entrypoint = dart_entrypoint_.c_str();
305}
306
308 if (arg.empty()) {
309 return;
310 }
311
312 command_line_arguments_.emplace_back(std::move(arg));
313}
314
316 if (arg.empty()) {
317 return;
318 }
319
320 dart_entrypoint_arguments_.emplace_back(std::move(arg));
321}
322
324 const FlutterTaskRunnerDescription* runner) {
325 if (runner == nullptr) {
326 return;
327 }
328 custom_task_runners_.platform_task_runner = runner;
329 project_args_.custom_task_runners = &custom_task_runners_;
330}
331
333 project_args_.vsync_callback = [](void* user_data, intptr_t baton) {
334 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
335 context->RunVsyncCallback(baton);
336 };
337}
338
342
344 const FlutterTaskRunnerDescription* runner) {
345 if (runner == nullptr) {
346 return;
347 }
348
349 custom_task_runners_.render_task_runner = runner;
350 project_args_.custom_task_runners = &custom_task_runners_;
351}
352
357
358void EmbedderConfigBuilder::SetCompositor(bool avoid_backing_store_cache,
359 bool use_present_layers_callback) {
360 context_.SetupCompositor();
361 auto& compositor = context_.GetCompositor();
362 compositor_.struct_size = sizeof(compositor_);
363 compositor_.user_data = &compositor;
364 compositor_.create_backing_store_callback =
365 [](const FlutterBackingStoreConfig* config, //
366 FlutterBackingStore* backing_store_out, //
367 void* user_data //
368 ) {
369 return reinterpret_cast<EmbedderTestCompositor*>(user_data)
370 ->CreateBackingStore(config, backing_store_out);
371 };
372 compositor_.collect_backing_store_callback =
373 [](const FlutterBackingStore* backing_store, //
374 void* user_data //
375 ) {
376 return reinterpret_cast<EmbedderTestCompositor*>(user_data)
377 ->CollectBackingStore(backing_store);
378 };
379 if (use_present_layers_callback) {
380 compositor_.present_layers_callback = [](const FlutterLayer** layers,
381 size_t layers_count,
382 void* user_data) {
383 auto compositor = reinterpret_cast<EmbedderTestCompositor*>(user_data);
384
385 // The present layers callback is incompatible with multiple views;
386 // it can only be used to render the implicit view.
387 return compositor->Present(kFlutterImplicitViewId, layers, layers_count);
388 };
389 } else {
390 compositor_.present_view_callback = [](const FlutterPresentViewInfo* info) {
391 auto compositor =
392 reinterpret_cast<EmbedderTestCompositor*>(info->user_data);
393
394 return compositor->Present(info->view_id, info->layers,
395 info->layers_count);
396 };
397 }
398 compositor_.avoid_backing_store_cache = avoid_backing_store_cache;
399 project_args_.compositor = &compositor_;
400}
401
405
408 FlutterSoftwarePixelFormat software_pixfmt) {
409 auto& compositor = context_.GetCompositor();
410 // TODO(wrightgeorge): figure out a better way of plumbing through the
411 // GrDirectContext
412 compositor.SetBackingStoreProducer(
413 std::make_unique<EmbedderTestBackingStoreProducer>(
414 compositor.GetGrContext(), type, software_pixfmt));
415}
416
418 return SetupEngine(true);
419}
420
422 return SetupEngine(false);
423}
424
425UniqueEngine EmbedderConfigBuilder::SetupEngine(bool run) const {
426 FlutterEngine engine = nullptr;
427 FlutterProjectArgs project_args = project_args_;
428
429 std::vector<const char*> args;
430 args.reserve(command_line_arguments_.size());
431
432 for (const auto& arg : command_line_arguments_) {
433 args.push_back(arg.c_str());
434 }
435
436 if (!args.empty()) {
437 project_args.command_line_argv = args.data();
438 project_args.command_line_argc = args.size();
439 } else {
440 // Clear it out in case this is not the first engine launch from the
441 // embedder config builder.
442 project_args.command_line_argv = nullptr;
443 project_args.command_line_argc = 0;
444 }
445
446 std::vector<const char*> dart_args;
447 dart_args.reserve(dart_entrypoint_arguments_.size());
448
449 for (const auto& arg : dart_entrypoint_arguments_) {
450 dart_args.push_back(arg.c_str());
451 }
452
453 if (!dart_args.empty()) {
454 project_args.dart_entrypoint_argv = dart_args.data();
455 project_args.dart_entrypoint_argc = dart_args.size();
456 } else {
457 // Clear it out in case this is not the first engine launch from the
458 // embedder config builder.
459 project_args.dart_entrypoint_argv = nullptr;
460 project_args.dart_entrypoint_argc = 0;
461 }
462
463 auto result =
464 run ? FlutterEngineRun(FLUTTER_ENGINE_VERSION, &renderer_config_,
465 &project_args, &context_, &engine)
467 &project_args, &context_, &engine);
468
469 if (result != kSuccess) {
470 return {};
471 }
472
473 return UniqueEngine{engine};
474}
475
476#ifdef SHELL_ENABLE_METAL
477
478void EmbedderConfigBuilder::InitializeMetalRendererConfig() {
480 return;
481 }
482
483 metal_renderer_config_.struct_size = sizeof(metal_renderer_config_);
484 EmbedderTestContextMetal& metal_context =
485 reinterpret_cast<EmbedderTestContextMetal&>(context_);
486
487 metal_renderer_config_.device =
488 metal_context.GetTestMetalContext()->GetMetalDevice();
489 metal_renderer_config_.present_command_queue =
490 metal_context.GetTestMetalContext()->GetMetalCommandQueue();
491 metal_renderer_config_.get_next_drawable_callback =
492 [](void* user_data, const FlutterFrameInfo* frame_info) {
493 return reinterpret_cast<EmbedderTestContextMetal*>(user_data)
494 ->GetNextDrawable(frame_info);
495 };
496 metal_renderer_config_.present_drawable_callback =
497 [](void* user_data, const FlutterMetalTexture* texture) -> bool {
498 EmbedderTestContextMetal* metal_context =
499 reinterpret_cast<EmbedderTestContextMetal*>(user_data);
500 return metal_context->Present(texture->texture_id);
501 };
502 metal_renderer_config_.external_texture_frame_callback =
503 [](void* user_data, int64_t texture_id, size_t width, size_t height,
504 FlutterMetalExternalTexture* texture_out) -> bool {
505 EmbedderTestContextMetal* metal_context =
506 reinterpret_cast<EmbedderTestContextMetal*>(user_data);
507 return metal_context->PopulateExternalTexture(texture_id, width, height,
508 texture_out);
509 };
510}
511
512#endif // SHELL_ENABLE_METAL
513
514#ifdef SHELL_ENABLE_VULKAN
515
516void EmbedderConfigBuilder::InitializeVulkanRendererConfig() {
518 return;
519 }
520
521 vulkan_renderer_config_.struct_size = sizeof(FlutterVulkanRendererConfig);
522 vulkan_renderer_config_.version =
523 static_cast<EmbedderTestContextVulkan&>(context_)
524 .vulkan_context_->application_->GetAPIVersion();
525 vulkan_renderer_config_.instance =
526 static_cast<EmbedderTestContextVulkan&>(context_)
527 .vulkan_context_->application_->GetInstance();
528 vulkan_renderer_config_.physical_device =
529 static_cast<EmbedderTestContextVulkan&>(context_)
530 .vulkan_context_->device_->GetPhysicalDeviceHandle();
531 vulkan_renderer_config_.device =
532 static_cast<EmbedderTestContextVulkan&>(context_)
533 .vulkan_context_->device_->GetHandle();
534 vulkan_renderer_config_.queue_family_index =
535 static_cast<EmbedderTestContextVulkan&>(context_)
536 .vulkan_context_->device_->GetGraphicsQueueIndex();
537 vulkan_renderer_config_.queue =
538 static_cast<EmbedderTestContextVulkan&>(context_)
539 .vulkan_context_->device_->GetQueueHandle();
540 vulkan_renderer_config_.get_instance_proc_address_callback =
542 vulkan_renderer_config_.get_next_image_callback =
543 [](void* context,
544 const FlutterFrameInfo* frame_info) -> FlutterVulkanImage {
545 VkImage image =
546 reinterpret_cast<EmbedderTestContextVulkan*>(context)->GetNextImage(
547 {static_cast<int>(frame_info->size.width),
548 static_cast<int>(frame_info->size.height)});
549 return {
550 .struct_size = sizeof(FlutterVulkanImage),
551 .image = reinterpret_cast<uint64_t>(image),
552 .format = VK_FORMAT_R8G8B8A8_UNORM,
553 };
554 };
555 vulkan_renderer_config_.present_image_callback =
556 [](void* context, const FlutterVulkanImage* image) -> bool {
557 return reinterpret_cast<EmbedderTestContextVulkan*>(context)->PresentImage(
558 reinterpret_cast<VkImage>(image->image));
559 };
560}
561
562#endif
563
564} // namespace testing
565} // namespace flutter
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
void SetSoftwareRendererConfig(SkISize surface_size=SkISize::Make(1, 1))
void SetPlatformTaskRunner(const FlutterTaskRunnerDescription *runner)
void SetRendererConfig(EmbedderTestContextType type, SkISize surface_size)
void SetExecutableName(std::string executable_name)
void SetRenderTargetType(EmbedderTestBackingStoreProducer::RenderTargetType type, FlutterSoftwarePixelFormat software_pixfmt=kFlutterSoftwarePixelFormatNative32)
void SetRenderTaskRunner(const FlutterTaskRunnerDescription *runner)
void SetVulkanRendererConfig(SkISize surface_size, std::optional< FlutterVulkanInstanceProcAddressCallback > instance_proc_address_callback={})
EmbedderConfigBuilder(EmbedderTestContext &context, InitializationPreference preference=InitializationPreference::kSnapshotsInitialize)
void SetCompositor(bool avoid_backing_store_cache=false, bool use_present_layers_callback=false)
void SetPlatformMessageCallback(const std::function< void(const FlutterPlatformMessage *)> &callback)
void SetBackingStoreProducer(std::unique_ptr< EmbedderTestBackingStoreProducer > backingstore_producer)
bool Present(FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)
static void * InstanceProcAddr(void *user_data, FlutterVulkanInstanceHandle instance, const char *name)
const fml::Mapping * GetIsolateSnapshotData() const
virtual EmbedderTestContextType GetContextType() const =0
const fml::Mapping * GetVMSnapshotInstructions() const
FlutterUpdateSemanticsNodeCallback GetUpdateSemanticsNodeCallbackHook()
const fml::Mapping * GetIsolateSnapshotInstructions() const
static FlutterLogMessageCallback GetLogMessageCallbackHook()
void SetPlatformMessageCallback(const std::function< void(const FlutterPlatformMessage *)> &callback)
static FlutterComputePlatformResolvedLocaleCallback GetComputePlatformResolvedLocaleCallbackHook()
FlutterUpdateSemanticsCustomActionCallback GetUpdateSemanticsCustomActionCallbackHook()
FlutterUpdateSemanticsCallback2 GetUpdateSemanticsCallback2Hook()
FlutterUpdateSemanticsCallback GetUpdateSemanticsCallbackHook()
FlutterChannelUpdateCallback GetChannelUpdateCallbackHook()
const fml::Mapping * GetVMSnapshotData() const
virtual void SetupSurface(SkISize surface_size)=0
FlutterEngineResult FlutterEngineRun(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Initialize and run a Flutter engine instance and return a handle to it. This is a convenience method ...
Definition embedder.cc:1711
FlutterEngineResult FlutterEngineInitialize(size_t version, const FlutterRendererConfig *config, const FlutterProjectArgs *args, void *user_data, FLUTTER_API_SYMBOL(FlutterEngine) *engine_out)
Initialize a Flutter engine instance. This does not run the Flutter application code till the Flutter...
Definition embedder.cc:1727
@ kVulkan
Definition embedder.h:86
@ kOpenGL
Definition embedder.h:80
@ kMetal
Definition embedder.h:85
@ kSoftware
Definition embedder.h:81
FlutterSoftwarePixelFormat
Definition embedder.h:333
#define FLUTTER_ENGINE_VERSION
Definition embedder.h:70
FlutterEngine engine
Definition main.cc:68
sk_sp< SkImage > image
Definition examples.cpp:29
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
GAsyncResult * result
#define FML_LOG(severity)
Definition logging.h:82
#define FML_CHECK(condition)
Definition logging.h:85
Win32Message message
FlTexture * texture
SK_API sk_sp< SkImage > RasterFromBitmap(const SkBitmap &bitmap)
fml::UniqueObject< FlutterEngine, UniqueEngineTraits > UniqueEngine
constexpr int64_t kFlutterImplicitViewId
Definition constants.h:35
DEF_SWITCHES_START aot vmservice shared library name
Definition switches.h:32
Definition run.py:1
int32_t height
int32_t width
const FlutterTaskRunnerDescription * render_task_runner
Definition embedder.h:1599
const FlutterTaskRunnerDescription * platform_task_runner
Definition embedder.h:1594
size_t struct_size
The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
Definition embedder.h:1589
size_t struct_size
The size of this struct. Must be sizeof(FlutterFrameInfo).
Definition embedder.h:475
FlutterUIntSize size
The size of the surface that will be backed by the fbo.
Definition embedder.h:477
uint32_t fbo_id
Id of the fbo backing the surface that was presented.
Definition embedder.h:499
FlutterPlatformMessageCallback platform_message_callback
Definition embedder.h:2190
FlutterComputePlatformResolvedLocaleCallback compute_platform_resolved_locale_callback
Definition embedder.h:2362
FlutterLogMessageCallback log_message_callback
Definition embedder.h:2382
VsyncCallback vsync_callback
Definition embedder.h:2287
const char * assets_path
Definition embedder.h:2142
const uint8_t * isolate_snapshot_data
Definition embedder.h:2211
FlutterEngineAOTData aot_data
Definition embedder.h:2351
FlutterUpdateSemanticsCallback update_semantics_callback
Definition embedder.h:2417
const uint8_t * vm_snapshot_data
Definition embedder.h:2195
size_t isolate_snapshot_instructions_size
Definition embedder.h:2222
const char *const * dart_entrypoint_argv
Definition embedder.h:2374
size_t struct_size
The size of this struct. Must be sizeof(FlutterProjectArgs).
Definition embedder.h:2138
FlutterUpdateSemanticsCallback2 update_semantics_callback2
Definition embedder.h:2429
const uint8_t * vm_snapshot_instructions
Definition embedder.h:2203
size_t isolate_snapshot_data_size
Definition embedder.h:2214
const char *const * command_line_argv
Definition embedder.h:2184
FlutterChannelUpdateCallback channel_update_callback
Definition embedder.h:2434
size_t vm_snapshot_instructions_size
Definition embedder.h:2206
bool shutdown_dart_vm_when_done
Definition embedder.h:2320
const char * custom_dart_entrypoint
Definition embedder.h:2296
FlutterUpdateSemanticsCustomActionCallback update_semantics_custom_action_callback
Definition embedder.h:2265
FlutterUpdateSemanticsNodeCallback update_semantics_node_callback
Definition embedder.h:2244
const FlutterCustomTaskRunners * custom_task_runners
Definition embedder.h:2301
size_t vm_snapshot_data_size
Definition embedder.h:2198
const char * log_tag
Definition embedder.h:2389
int command_line_argc
The command line argument count used to initialize the project.
Definition embedder.h:2168
VoidCallback root_isolate_create_callback
Definition embedder.h:2225
const uint8_t * isolate_snapshot_instructions
Definition embedder.h:2219
const FlutterCompositor * compositor
Definition embedder.h:2336
FlutterVulkanRendererConfig vulkan
Definition embedder.h:830
FlutterMetalRendererConfig metal
Definition embedder.h:829
FlutterSoftwareRendererConfig software
Definition embedder.h:828
FlutterOpenGLRendererConfig open_gl
Definition embedder.h:827
FlutterRendererType type
Definition embedder.h:825
size_t struct_size
The size of this struct. Must be sizeof(FlutterSoftwareRendererConfig).
Definition embedder.h:816
SoftwareSurfacePresentCallback surface_present_callback
Definition embedder.h:821
uint32_t height
Definition embedder.h:431
uint32_t width
Definition embedder.h:430
FlutterVulkanInstanceProcAddressCallback get_instance_proc_address_callback
Definition embedder.h:800
static constexpr SkISize Make(int32_t w, int32_t h)
Definition SkSize.h:20
static SkImageInfo MakeN32Premul(int width, int height)
int64_t texture_id
#define ERROR(message)
@ VK_FORMAT_R8G8B8A8_UNORM