Flutter Engine
 
Loading...
Searching...
No Matches
flutter::testing::EmbedderConfigBuilder Class Reference

#include <embedder_config_builder.h>

Public Types

enum class  InitializationPreference {
  kSnapshotsInitialize ,
  kAOTDataInitialize ,
  kMultiAOTInitialize ,
  kNoInitialize
}
 

Public Member Functions

 EmbedderConfigBuilder (EmbedderTestContext &context, InitializationPreference preference=InitializationPreference::kSnapshotsInitialize)
 
 ~EmbedderConfigBuilder ()
 
FlutterProjectArgsGetProjectArgs ()
 
void SetAssetsPath ()
 
void SetSnapshots ()
 
void SetAOTDataElf ()
 
void SetIsolateCreateCallbackHook ()
 
void SetSemanticsCallbackHooks ()
 
void SetLogMessageCallbackHook ()
 
void SetChannelUpdateCallbackHook ()
 
void SetViewFocusChangeRequestHook ()
 
void SetLogTag (std::string tag)
 
void SetLocalizationCallbackHooks ()
 
void SetExecutableName (std::string executable_name)
 
void SetDartEntrypoint (std::string entrypoint)
 
void AddCommandLineArgument (std::string arg)
 
void AddDartEntrypointArgument (std::string arg)
 
void SetPlatformTaskRunner (const FlutterTaskRunnerDescription *runner)
 
void SetUITaskRunner (const FlutterTaskRunnerDescription *runner)
 
void SetRenderTaskRunner (const FlutterTaskRunnerDescription *runner)
 
void SetPlatformMessageCallback (const std::function< void(const FlutterPlatformMessage *)> &callback)
 
void SetViewFocusChangeRequestCallback (const std::function< void(const FlutterViewFocusChangeRequest *)> &callback)
 
void SetCompositor (bool avoid_backing_store_cache=false, bool use_present_layers_callback=false)
 
FlutterCompositorGetCompositor ()
 
void SetSurface (DlISize surface_size)
 
void SetRenderTargetType (EmbedderTestBackingStoreProducer::RenderTargetType type, FlutterSoftwarePixelFormat software_pixfmt=kFlutterSoftwarePixelFormatNative32)
 
UniqueEngine LaunchEngine () const
 
UniqueEngine InitializeEngine () const
 
void SetupVsyncCallback ()
 
void SetViewFocusChangeRequestCallback (const FlutterViewFocusChangeRequestCallback &callback)
 

Detailed Description

Definition at line 29 of file embedder_config_builder.h.

Member Enumeration Documentation

◆ InitializationPreference

Constructor & Destructor Documentation

◆ EmbedderConfigBuilder()

flutter::testing::EmbedderConfigBuilder::EmbedderConfigBuilder ( EmbedderTestContext context,
InitializationPreference  preference = InitializationPreference::kSnapshotsInitialize 
)
explicit

Definition at line 15 of file embedder_config_builder.cc.

18 : context_(context) {
19 project_args_.struct_size = sizeof(project_args_);
20 project_args_.shutdown_dart_vm_when_done = true;
21 project_args_.platform_message_callback =
22 [](const FlutterPlatformMessage* message, void* context) {
23 reinterpret_cast<EmbedderTestContext*>(context)
24 ->PlatformMessageCallback(message);
25 };
26
27 custom_task_runners_.struct_size = sizeof(FlutterCustomTaskRunners);
28
29 // The first argument is always the executable name. Don't make tests have to
30 // do this manually.
31 AddCommandLineArgument("embedder_unittest");
32
41 AddCommandLineArgument("--disable-vm-service");
42
46 }
50 }
51 }
52}
G_BEGIN_DECLS GBytes * message
size_t struct_size
The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
Definition embedder.h:1891
FlutterPlatformMessageCallback platform_message_callback
Definition embedder.h:2510
size_t struct_size
The size of this struct. Must be sizeof(FlutterProjectArgs).
Definition embedder.h:2458
bool shutdown_dart_vm_when_done
Definition embedder.h:2640

References AddCommandLineArgument(), kAOTDataInitialize, kMultiAOTInitialize, kNoInitialize, kSnapshotsInitialize, message, FlutterProjectArgs::platform_message_callback, SetAOTDataElf(), SetAssetsPath(), SetChannelUpdateCallbackHook(), SetIsolateCreateCallbackHook(), SetLocalizationCallbackHooks(), SetLogMessageCallbackHook(), SetSemanticsCallbackHooks(), SetSnapshots(), SetViewFocusChangeRequestHook(), FlutterProjectArgs::shutdown_dart_vm_when_done, FlutterCustomTaskRunners::struct_size, and FlutterProjectArgs::struct_size.

◆ ~EmbedderConfigBuilder()

flutter::testing::EmbedderConfigBuilder::~EmbedderConfigBuilder ( )
default

Member Function Documentation

◆ AddCommandLineArgument()

void flutter::testing::EmbedderConfigBuilder::AddCommandLineArgument ( std::string  arg)

Definition at line 147 of file embedder_config_builder.cc.

147 {
148 if (arg.empty()) {
149 return;
150 }
151
152 command_line_arguments_.emplace_back(std::move(arg));
153}

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

◆ AddDartEntrypointArgument()

void flutter::testing::EmbedderConfigBuilder::AddDartEntrypointArgument ( std::string  arg)

Definition at line 155 of file embedder_config_builder.cc.

155 {
156 if (arg.empty()) {
157 return;
158 }
159
160 dart_entrypoint_arguments_.emplace_back(std::move(arg));
161}

Referenced by flutter::testing::TEST_F().

◆ GetCompositor()

FlutterCompositor & flutter::testing::EmbedderConfigBuilder::GetCompositor ( )

◆ GetProjectArgs()

◆ InitializeEngine()

◆ LaunchEngine()

UniqueEngine flutter::testing::EmbedderConfigBuilder::LaunchEngine ( ) const

Definition at line 262 of file embedder_config_builder.cc.

262 {
263 return SetupEngine(true);
264}

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

◆ SetAOTDataElf()

void flutter::testing::EmbedderConfigBuilder::SetAOTDataElf ( )

Definition at line 86 of file embedder_config_builder.cc.

86 {
87 project_args_.aot_data = context_.GetAOTData();
88}
FlutterEngineAOTData aot_data
Definition embedder.h:2671

References FlutterProjectArgs::aot_data, and flutter::testing::EmbedderTestContext::GetAOTData().

Referenced by EmbedderConfigBuilder().

◆ SetAssetsPath()

void flutter::testing::EmbedderConfigBuilder::SetAssetsPath ( )

Definition at line 60 of file embedder_config_builder.cc.

60 {
61 project_args_.assets_path = context_.GetAssetsPath().c_str();
62}
const char * assets_path
Definition embedder.h:2462

References FlutterProjectArgs::assets_path, and flutter::testing::EmbedderTestContext::GetAssetsPath().

Referenced by EmbedderConfigBuilder().

◆ SetChannelUpdateCallbackHook()

void flutter::testing::EmbedderConfigBuilder::SetChannelUpdateCallbackHook ( )

Definition at line 111 of file embedder_config_builder.cc.

111 {
112 project_args_.channel_update_callback =
114}
FlutterChannelUpdateCallback GetChannelUpdateCallbackHook()
FlutterChannelUpdateCallback channel_update_callback
Definition embedder.h:2754

References FlutterProjectArgs::channel_update_callback, and flutter::testing::EmbedderTestContext::GetChannelUpdateCallbackHook().

Referenced by EmbedderConfigBuilder().

◆ SetCompositor()

void flutter::testing::EmbedderConfigBuilder::SetCompositor ( bool  avoid_backing_store_cache = false,
bool  use_present_layers_callback = false 
)

Definition at line 208 of file embedder_config_builder.cc.

209 {
210 context_.SetupCompositor();
211 auto& compositor = context_.GetCompositor();
212 compositor_.struct_size = sizeof(compositor_);
213 compositor_.user_data = &compositor;
214 compositor_.create_backing_store_callback =
215 [](const FlutterBackingStoreConfig* config, //
216 FlutterBackingStore* backing_store_out, //
217 void* user_data //
218 ) {
219 return reinterpret_cast<EmbedderTestCompositor*>(user_data)
220 ->CreateBackingStore(config, backing_store_out);
221 };
222 compositor_.collect_backing_store_callback =
223 [](const FlutterBackingStore* backing_store, //
224 void* user_data //
225 ) {
226 return reinterpret_cast<EmbedderTestCompositor*>(user_data)
227 ->CollectBackingStore(backing_store);
228 };
229 if (use_present_layers_callback) {
230 compositor_.present_layers_callback = [](const FlutterLayer** layers,
231 size_t layers_count,
232 void* user_data) {
233 auto compositor = reinterpret_cast<EmbedderTestCompositor*>(user_data);
234
235 // The present layers callback is incompatible with multiple views;
236 // it can only be used to render the implicit view.
238 };
239 } else {
240 compositor_.present_view_callback = [](const FlutterPresentViewInfo* info) {
241 auto compositor =
242 reinterpret_cast<EmbedderTestCompositor*>(info->user_data);
243
244 return compositor->Present(info->view_id, info->layers,
245 info->layers_count);
246 };
247 }
248 compositor_.avoid_backing_store_cache = avoid_backing_store_cache;
249 project_args_.compositor = &compositor_;
250}
bool Present(FlutterViewIdentifier view_id, const FlutterLayer **layers, size_t layers_count)
const FlutterLayer size_t layers_count
const FlutterLayer ** layers
constexpr int64_t kFlutterImplicitViewId
Definition constants.h:35
const FlutterCompositor * compositor
Definition embedder.h:2656

References FlutterProjectArgs::compositor, flutter::testing::EmbedderTestContext::GetCompositor(), flutter::kFlutterImplicitViewId, layers, layers_count, flutter::testing::EmbedderTestCompositor::Present(), flutter::testing::EmbedderTestContext::SetupCompositor(), and user_data.

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

◆ SetDartEntrypoint()

void flutter::testing::EmbedderConfigBuilder::SetDartEntrypoint ( std::string  entrypoint)

Definition at line 138 of file embedder_config_builder.cc.

138 {
139 if (entrypoint.empty()) {
140 return;
141 }
142
143 dart_entrypoint_ = std::move(entrypoint);
144 project_args_.custom_dart_entrypoint = dart_entrypoint_.c_str();
145}
const char * custom_dart_entrypoint
Definition embedder.h:2616

References FlutterProjectArgs::custom_dart_entrypoint.

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

◆ SetExecutableName()

void flutter::testing::EmbedderConfigBuilder::SetExecutableName ( std::string  executable_name)

Definition at line 131 of file embedder_config_builder.cc.

131 {
132 if (executable_name.empty()) {
133 return;
134 }
135 command_line_arguments_[0] = std::move(executable_name);
136}

Referenced by flutter::testing::TEST_F().

◆ SetIsolateCreateCallbackHook()

void flutter::testing::EmbedderConfigBuilder::SetIsolateCreateCallbackHook ( )

◆ SetLocalizationCallbackHooks()

void flutter::testing::EmbedderConfigBuilder::SetLocalizationCallbackHooks ( )

◆ SetLogMessageCallbackHook()

void flutter::testing::EmbedderConfigBuilder::SetLogMessageCallbackHook ( )

◆ SetLogTag()

void flutter::testing::EmbedderConfigBuilder::SetLogTag ( std::string  tag)

Definition at line 121 of file embedder_config_builder.cc.

121 {
122 log_tag_ = std::move(tag);
123 project_args_.log_tag = log_tag_.c_str();
124}
const char * log_tag
Definition embedder.h:2709

References FlutterProjectArgs::log_tag.

Referenced by flutter::testing::TEST_F().

◆ SetPlatformMessageCallback()

void flutter::testing::EmbedderConfigBuilder::SetPlatformMessageCallback ( const std::function< void(const FlutterPlatformMessage *)> &  callback)

◆ SetPlatformTaskRunner()

void flutter::testing::EmbedderConfigBuilder::SetPlatformTaskRunner ( const FlutterTaskRunnerDescription runner)

Definition at line 163 of file embedder_config_builder.cc.

164 {
165 if (runner == nullptr) {
166 return;
167 }
168 custom_task_runners_.platform_task_runner = runner;
169 project_args_.custom_task_runners = &custom_task_runners_;
170}
const FlutterTaskRunnerDescription * platform_task_runner
Definition embedder.h:1896
const FlutterCustomTaskRunners * custom_task_runners
Definition embedder.h:2621

References FlutterProjectArgs::custom_task_runners, and FlutterCustomTaskRunners::platform_task_runner.

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

◆ SetRenderTargetType()

void flutter::testing::EmbedderConfigBuilder::SetRenderTargetType ( EmbedderTestBackingStoreProducer::RenderTargetType  type,
FlutterSoftwarePixelFormat  software_pixfmt = kFlutterSoftwarePixelFormatNative32 
)

Definition at line 256 of file embedder_config_builder.cc.

258 {
259 context_.GetCompositor().SetRenderTargetType(type, software_pixfmt);
260}
GLenum type
virtual void SetRenderTargetType(EmbedderTestBackingStoreProducer::RenderTargetType type, FlutterSoftwarePixelFormat software_pixfmt)=0

References flutter::testing::EmbedderTestContext::GetCompositor(), flutter::testing::EmbedderTestCompositor::SetRenderTargetType(), and type.

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

◆ SetRenderTaskRunner()

void flutter::testing::EmbedderConfigBuilder::SetRenderTaskRunner ( const FlutterTaskRunnerDescription runner)

Definition at line 188 of file embedder_config_builder.cc.

189 {
190 if (runner == nullptr) {
191 return;
192 }
193
194 custom_task_runners_.render_task_runner = runner;
195 project_args_.custom_task_runners = &custom_task_runners_;
196}
const FlutterTaskRunnerDescription * render_task_runner
Definition embedder.h:1901

References FlutterProjectArgs::custom_task_runners, and FlutterCustomTaskRunners::render_task_runner.

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

◆ SetSemanticsCallbackHooks()

void flutter::testing::EmbedderConfigBuilder::SetSemanticsCallbackHooks ( )

Definition at line 95 of file embedder_config_builder.cc.

95 {
96 project_args_.update_semantics_callback2 =
98 project_args_.update_semantics_callback =
100 project_args_.update_semantics_node_callback =
104}
FlutterUpdateSemanticsNodeCallback GetUpdateSemanticsNodeCallbackHook()
FlutterUpdateSemanticsCustomActionCallback GetUpdateSemanticsCustomActionCallbackHook()
FlutterUpdateSemanticsCallback2 GetUpdateSemanticsCallback2Hook()
FlutterUpdateSemanticsCallback GetUpdateSemanticsCallbackHook()
FlutterUpdateSemanticsCallback update_semantics_callback
Definition embedder.h:2737
FlutterUpdateSemanticsCallback2 update_semantics_callback2
Definition embedder.h:2749
FlutterUpdateSemanticsCustomActionCallback update_semantics_custom_action_callback
Definition embedder.h:2585
FlutterUpdateSemanticsNodeCallback update_semantics_node_callback
Definition embedder.h:2564

References flutter::testing::EmbedderTestContext::GetUpdateSemanticsCallback2Hook(), flutter::testing::EmbedderTestContext::GetUpdateSemanticsCallbackHook(), flutter::testing::EmbedderTestContext::GetUpdateSemanticsCustomActionCallbackHook(), flutter::testing::EmbedderTestContext::GetUpdateSemanticsNodeCallbackHook(), FlutterProjectArgs::update_semantics_callback, FlutterProjectArgs::update_semantics_callback2, FlutterProjectArgs::update_semantics_custom_action_callback, and FlutterProjectArgs::update_semantics_node_callback.

Referenced by EmbedderConfigBuilder().

◆ SetSnapshots()

void flutter::testing::EmbedderConfigBuilder::SetSnapshots ( )

Definition at line 64 of file embedder_config_builder.cc.

64 {
65 if (auto mapping = context_.GetVMSnapshotData()) {
66 project_args_.vm_snapshot_data = mapping->GetMapping();
67 project_args_.vm_snapshot_data_size = mapping->GetSize();
68 }
69
70 if (auto mapping = context_.GetVMSnapshotInstructions()) {
71 project_args_.vm_snapshot_instructions = mapping->GetMapping();
72 project_args_.vm_snapshot_instructions_size = mapping->GetSize();
73 }
74
75 if (auto mapping = context_.GetIsolateSnapshotData()) {
76 project_args_.isolate_snapshot_data = mapping->GetMapping();
77 project_args_.isolate_snapshot_data_size = mapping->GetSize();
78 }
79
80 if (auto mapping = context_.GetIsolateSnapshotInstructions()) {
81 project_args_.isolate_snapshot_instructions = mapping->GetMapping();
82 project_args_.isolate_snapshot_instructions_size = mapping->GetSize();
83 }
84}
const fml::Mapping * GetIsolateSnapshotData() const
const fml::Mapping * GetVMSnapshotInstructions() const
const fml::Mapping * GetIsolateSnapshotInstructions() const
const fml::Mapping * GetVMSnapshotData() const
const uint8_t * isolate_snapshot_data
Definition embedder.h:2531
const uint8_t * vm_snapshot_data
Definition embedder.h:2515
size_t isolate_snapshot_instructions_size
Definition embedder.h:2542
const uint8_t * vm_snapshot_instructions
Definition embedder.h:2523
size_t isolate_snapshot_data_size
Definition embedder.h:2534
size_t vm_snapshot_instructions_size
Definition embedder.h:2526
size_t vm_snapshot_data_size
Definition embedder.h:2518
const uint8_t * isolate_snapshot_instructions
Definition embedder.h:2539

References flutter::testing::EmbedderTestContext::GetIsolateSnapshotData(), flutter::testing::EmbedderTestContext::GetIsolateSnapshotInstructions(), flutter::testing::EmbedderTestContext::GetVMSnapshotData(), flutter::testing::EmbedderTestContext::GetVMSnapshotInstructions(), FlutterProjectArgs::isolate_snapshot_data, FlutterProjectArgs::isolate_snapshot_data_size, FlutterProjectArgs::isolate_snapshot_instructions, FlutterProjectArgs::isolate_snapshot_instructions_size, FlutterProjectArgs::vm_snapshot_data, FlutterProjectArgs::vm_snapshot_data_size, FlutterProjectArgs::vm_snapshot_instructions, and FlutterProjectArgs::vm_snapshot_instructions_size.

Referenced by EmbedderConfigBuilder().

◆ SetSurface()

void flutter::testing::EmbedderConfigBuilder::SetSurface ( DlISize  surface_size)
inline

Definition at line 95 of file embedder_config_builder.h.

95{ context_.SetSurface(surface_size); }
virtual void SetSurface(DlISize surface_size)=0

References flutter::testing::EmbedderTestContext::SetSurface().

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

◆ SetUITaskRunner()

void flutter::testing::EmbedderConfigBuilder::SetUITaskRunner ( const FlutterTaskRunnerDescription runner)

Definition at line 172 of file embedder_config_builder.cc.

173 {
174 if (runner == nullptr) {
175 return;
176 }
177 custom_task_runners_.ui_task_runner = runner;
178 project_args_.custom_task_runners = &custom_task_runners_;
179}
const FlutterTaskRunnerDescription * ui_task_runner
Definition embedder.h:1908

References FlutterProjectArgs::custom_task_runners, and FlutterCustomTaskRunners::ui_task_runner.

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

◆ SetupVsyncCallback()

void flutter::testing::EmbedderConfigBuilder::SetupVsyncCallback ( )

Definition at line 181 of file embedder_config_builder.cc.

181 {
182 project_args_.vsync_callback = [](void* user_data, intptr_t baton) {
183 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
184 context->RunVsyncCallback(baton);
185 };
186}
VsyncCallback vsync_callback
Definition embedder.h:2607

References flutter::testing::EmbedderTestContext::RunVsyncCallback(), user_data, and FlutterProjectArgs::vsync_callback.

Referenced by flutter::testing::TEST_F().

◆ SetViewFocusChangeRequestCallback() [1/2]

void flutter::testing::EmbedderConfigBuilder::SetViewFocusChangeRequestCallback ( const FlutterViewFocusChangeRequestCallback callback)

◆ SetViewFocusChangeRequestCallback() [2/2]

void flutter::testing::EmbedderConfigBuilder::SetViewFocusChangeRequestCallback ( const std::function< void(const FlutterViewFocusChangeRequest *)> &  callback)

Definition at line 203 of file embedder_config_builder.cc.

204 {
206}
void SetViewFocusChangeRequestCallback(const ViewFocusChangeRequestCallback &callback)

References callback, and flutter::testing::EmbedderTestContext::SetViewFocusChangeRequestCallback().

Referenced by flutter::testing::TEST_F().

◆ SetViewFocusChangeRequestHook()

void flutter::testing::EmbedderConfigBuilder::SetViewFocusChangeRequestHook ( )

Definition at line 116 of file embedder_config_builder.cc.

116 {
119}
FlutterViewFocusChangeRequestCallback GetViewFocusChangeRequestCallbackHook()
FlutterViewFocusChangeRequestCallback view_focus_change_request_callback
Definition embedder.h:2760

References flutter::testing::EmbedderTestContext::GetViewFocusChangeRequestCallbackHook(), and FlutterProjectArgs::view_focus_change_request_callback.

Referenced by EmbedderConfigBuilder().


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