Flutter Engine
 
Loading...
Searching...
No Matches
flutter::testing::EmbedderTestContext Class Referenceabstract

#include <embedder_test_context.h>

Inheritance diagram for flutter::testing::EmbedderTestContext:
flutter::testing::EmbedderTestContextGL flutter::testing::EmbedderTestContextMetal flutter::testing::EmbedderTestContextSoftware flutter::testing::EmbedderTestContextVulkan

Public Member Functions

 EmbedderTestContext (std::string assets_path="")
 
virtual ~EmbedderTestContext ()
 
const std::string & GetAssetsPath () const
 
const fml::MappingGetVMSnapshotData () const
 
const fml::MappingGetVMSnapshotInstructions () const
 
const fml::MappingGetIsolateSnapshotData () const
 
const fml::MappingGetIsolateSnapshotInstructions () const
 
FlutterEngineAOTData GetAOTData () const
 
void SetRootSurfaceTransformation (DlMatrix matrix)
 
FlutterRendererConfigGetRendererConfig ()
 
void AddIsolateCreateCallback (const fml::closure &closure)
 
void SetSemanticsUpdateCallback2 (SemanticsUpdateCallback2 update_semantics)
 
void SetSemanticsUpdateCallback (SemanticsUpdateCallback update_semantics)
 
void AddNativeCallback (const char *name, Dart_NativeFunction function)
 
void SetSemanticsNodeCallback (SemanticsNodeCallback update_semantics_node)
 
void SetSemanticsCustomActionCallback (SemanticsActionCallback semantics_custom_action)
 
void SetPlatformMessageCallback (const std::function< void(const FlutterPlatformMessage *)> &callback)
 
void SetLogMessageCallback (const LogMessageCallback &log_message_callback)
 
void SetChannelUpdateCallback (const ChannelUpdateCallback &callback)
 
void SetViewFocusChangeRequestCallback (const ViewFocusChangeRequestCallback &callback)
 
std::future< sk_sp< SkImage > > GetNextSceneImage ()
 
EmbedderTestCompositorGetCompositor ()
 
virtual size_t GetSurfacePresentCount () const =0
 
virtual EmbedderTestContextType GetContextType () const =0
 
void SetVsyncCallback (std::function< void(intptr_t)> callback)
 
void RunVsyncCallback (intptr_t baton)
 

Protected Types

using NextSceneCallback = std::function< void(sk_sp< SkImage > image)>
 

Protected Member Functions

FlutterUpdateSemanticsCallback2 GetUpdateSemanticsCallback2Hook ()
 
FlutterUpdateSemanticsCallback GetUpdateSemanticsCallbackHook ()
 
FlutterUpdateSemanticsNodeCallback GetUpdateSemanticsNodeCallbackHook ()
 
FlutterUpdateSemanticsCustomActionCallback GetUpdateSemanticsCustomActionCallbackHook ()
 
FlutterChannelUpdateCallback GetChannelUpdateCallbackHook ()
 
FlutterViewFocusChangeRequestCallback GetViewFocusChangeRequestCallbackHook ()
 
void SetupAOTMappingsIfNecessary ()
 
void SetupAOTDataIfNecessary ()
 
virtual void SetSurface (DlISize surface_size)=0
 
virtual void SetupCompositor ()=0
 
void FireIsolateCreateCallbacks ()
 
void SetNativeResolver ()
 
FlutterTransformation GetRootSurfaceTransformation ()
 
void PlatformMessageCallback (const FlutterPlatformMessage *message)
 
void FireRootSurfacePresentCallbackIfPresent (const std::function< sk_sp< SkImage >(void)> &image_callback)
 
void SetNextSceneCallback (const NextSceneCallback &next_scene_callback)
 
 FML_DISALLOW_COPY_AND_ASSIGN (EmbedderTestContext)
 

Static Protected Member Functions

static VoidCallback GetIsolateCreateCallbackHook ()
 
static FlutterLogMessageCallback GetLogMessageCallbackHook ()
 
static FlutterComputePlatformResolvedLocaleCallback GetComputePlatformResolvedLocaleCallbackHook ()
 

Protected Attributes

std::string assets_path_
 
ELFAOTSymbols aot_symbols_
 
std::unique_ptr< fml::Mappingvm_snapshot_data_
 
std::unique_ptr< fml::Mappingvm_snapshot_instructions_
 
std::unique_ptr< fml::Mappingisolate_snapshot_data_
 
std::unique_ptr< fml::Mappingisolate_snapshot_instructions_
 
UniqueAOTData aot_data_
 
std::vector< fml::closureisolate_create_callbacks_
 
std::shared_ptr< TestDartNativeResolvernative_resolver_
 
FlutterRendererConfig renderer_config_ = {}
 
SemanticsUpdateCallback2 update_semantics_callback2_
 
SemanticsUpdateCallback update_semantics_callback_
 
SemanticsNodeCallback update_semantics_node_callback_
 
SemanticsActionCallback update_semantics_custom_action_callback_
 
ChannelUpdateCallback channel_update_callback_
 
ViewFocusChangeRequestCallback view_focus_change_request_callback_
 
std::function< void(const FlutterPlatformMessage *)> platform_message_callback_
 
LogMessageCallback log_message_callback_
 
std::unique_ptr< EmbedderTestCompositorcompositor_
 
NextSceneCallback next_scene_callback_
 
DlMatrix root_surface_transformation_
 
std::function< void(intptr_t)> vsync_callback_ = nullptr
 

Friends

class EmbedderConfigBuilder
 

Detailed Description

Definition at line 58 of file embedder_test_context.h.

Member Typedef Documentation

◆ NextSceneCallback

using flutter::testing::EmbedderTestContext::NextSceneCallback = std::function<void(sk_sp<SkImage> image)>
protected

Definition at line 125 of file embedder_test_context.h.

Constructor & Destructor Documentation

◆ EmbedderTestContext()

flutter::testing::EmbedderTestContext::EmbedderTestContext ( std::string  assets_path = "")
explicit

Definition at line 20 of file embedder_test_context.cc.

21 : assets_path_(std::move(assets_path)),
24 native_resolver_(std::make_shared<TestDartNativeResolver>()) {
28 [weak_resolver =
29 std::weak_ptr<TestDartNativeResolver>{native_resolver_}]() {
30 if (auto resolver = weak_resolver.lock()) {
31 resolver->SetNativeResolverForIsolate();
32 }
33 });
34}
std::vector< fml::closure > isolate_create_callbacks_
std::shared_ptr< TestDartNativeResolver > native_resolver_
ELFAOTSymbols LoadELFSymbolFromFixturesIfNeccessary(std::string elf_filename)
Attempts to resolve AOT symbols from the portable ELF loader. This location is automatically resolved...
Definition elf_loader.cc:16
constexpr const char * kDefaultAOTAppELFFileName
Definition elf_loader.h:16

References isolate_create_callbacks_, native_resolver_, SetupAOTDataIfNecessary(), and SetupAOTMappingsIfNecessary().

◆ ~EmbedderTestContext()

flutter::testing::EmbedderTestContext::~EmbedderTestContext ( )
virtualdefault

Member Function Documentation

◆ AddIsolateCreateCallback()

void flutter::testing::EmbedderTestContext::AddIsolateCreateCallback ( const fml::closure closure)

Definition at line 103 of file embedder_test_context.cc.

104 {
105 if (closure) {
106 isolate_create_callbacks_.push_back(closure);
107 }
108}

References isolate_create_callbacks_.

◆ AddNativeCallback()

void flutter::testing::EmbedderTestContext::AddNativeCallback ( const char *  name,
Dart_NativeFunction  function 
)

Definition at line 123 of file embedder_test_context.cc.

124 {
125 native_resolver_->AddNativeCallback({name}, function);
126}
Dart_NativeFunction function
Definition fuchsia.cc:50
DEF_SWITCHES_START aot vmservice shared library name
Definition switch_defs.h:27

References function, flutter::name, and native_resolver_.

◆ FireIsolateCreateCallbacks()

void flutter::testing::EmbedderTestContext::FireIsolateCreateCallbacks ( )
protected

Definition at line 117 of file embedder_test_context.cc.

117 {
118 for (const auto& closure : isolate_create_callbacks_) {
119 closure();
120 }
121}
std::function< void()> closure
Definition closure.h:14

References isolate_create_callbacks_.

Referenced by GetIsolateCreateCallbackHook().

◆ FireRootSurfacePresentCallbackIfPresent()

void flutter::testing::EmbedderTestContext::FireRootSurfacePresentCallbackIfPresent ( const std::function< sk_sp< SkImage >(void)> &  image_callback)
protected
Note
Procedure doesn't copy all closures.

Definition at line 304 of file embedder_test_context.cc.

305 {
307 return;
308 }
310 next_scene_callback_ = nullptr;
311 callback(image_callback());
312}
FlutterDesktopBinaryReply callback

References callback, and next_scene_callback_.

Referenced by flutter::testing::EmbedderTestContextSoftware::Present(), flutter::testing::EmbedderTestContextMetal::Present(), and flutter::testing::EmbedderTestContextVulkan::PresentImage().

◆ FML_DISALLOW_COPY_AND_ASSIGN()

flutter::testing::EmbedderTestContext::FML_DISALLOW_COPY_AND_ASSIGN ( EmbedderTestContext  )
protected

◆ GetAOTData()

FlutterEngineAOTData flutter::testing::EmbedderTestContext::GetAOTData ( ) const

Definition at line 91 of file embedder_test_context.cc.

91 {
92 return aot_data_.get();
93}

References aot_data_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetAOTDataElf().

◆ GetAssetsPath()

const std::string & flutter::testing::EmbedderTestContext::GetAssetsPath ( ) const

Definition at line 70 of file embedder_test_context.cc.

70 {
71 return assets_path_;
72}

References assets_path_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetAssetsPath().

◆ GetChannelUpdateCallbackHook()

FlutterChannelUpdateCallback flutter::testing::EmbedderTestContext::GetChannelUpdateCallbackHook ( )
protected

Definition at line 250 of file embedder_test_context.cc.

250 {
251 if (channel_update_callback_ == nullptr) {
252 return nullptr;
253 }
254
255 return [](const FlutterChannelUpdate* update, void* user_data) {
256 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
257 if (context->channel_update_callback_) {
258 context->channel_update_callback_(update);
259 }
260 };
261}
EmbedderTestContext(std::string assets_path="")
An update to whether a message channel has a listener set or not.
Definition embedder.h:1829

References channel_update_callback_, and user_data.

Referenced by flutter::testing::EmbedderConfigBuilder::SetChannelUpdateCallbackHook().

◆ GetCompositor()

EmbedderTestCompositor & flutter::testing::EmbedderTestContext::GetCompositor ( )

Definition at line 277 of file embedder_test_context.cc.

277 {
279 << "Accessed the compositor on a context where one was not set up. Use "
280 "the config builder to set up a context with a custom compositor.";
281 return *compositor_;
282}
std::unique_ptr< EmbedderTestCompositor > compositor_
#define FML_CHECK(condition)
Definition logging.h:104

References compositor_, and FML_CHECK.

Referenced by flutter::testing::EmbedderConfigBuilder::SetCompositor(), and flutter::testing::EmbedderConfigBuilder::SetRenderTargetType().

◆ GetComputePlatformResolvedLocaleCallbackHook()

FlutterComputePlatformResolvedLocaleCallback flutter::testing::EmbedderTestContext::GetComputePlatformResolvedLocaleCallbackHook ( )
staticprotected

Definition at line 242 of file embedder_test_context.cc.

242 {
243 return [](const FlutterLocale** supported_locales,
244 size_t length) -> const FlutterLocale* {
245 return supported_locales[0];
246 };
247}
size_t length

References length.

Referenced by flutter::testing::EmbedderConfigBuilder::SetLocalizationCallbackHooks().

◆ GetContextType()

◆ GetIsolateCreateCallbackHook()

VoidCallback flutter::testing::EmbedderTestContext::GetIsolateCreateCallbackHook ( )
staticprotected

◆ GetIsolateSnapshotData()

const fml::Mapping * flutter::testing::EmbedderTestContext::GetIsolateSnapshotData ( ) const

Definition at line 82 of file embedder_test_context.cc.

82 {
83 return isolate_snapshot_data_.get();
84}
std::unique_ptr< fml::Mapping > isolate_snapshot_data_

References isolate_snapshot_data_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSnapshots().

◆ GetIsolateSnapshotInstructions()

const fml::Mapping * flutter::testing::EmbedderTestContext::GetIsolateSnapshotInstructions ( ) const

Definition at line 86 of file embedder_test_context.cc.

87 {
89}
std::unique_ptr< fml::Mapping > isolate_snapshot_instructions_

References isolate_snapshot_instructions_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSnapshots().

◆ GetLogMessageCallbackHook()

FlutterLogMessageCallback flutter::testing::EmbedderTestContext::GetLogMessageCallbackHook ( )
staticprotected

Definition at line 232 of file embedder_test_context.cc.

232 {
233 return [](const char* tag, const char* message, void* user_data) {
234 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
235 if (context->log_message_callback_) {
236 context->log_message_callback_(tag, message);
237 }
238 };
239}
G_BEGIN_DECLS GBytes * message

References log_message_callback_, message, and user_data.

Referenced by flutter::testing::EmbedderConfigBuilder::SetLogMessageCallbackHook().

◆ GetNextSceneImage()

std::future< sk_sp< SkImage > > flutter::testing::EmbedderTestContext::GetNextSceneImage ( )

Definition at line 293 of file embedder_test_context.cc.

293 {
294 std::promise<sk_sp<SkImage>> promise;
295 auto future = promise.get_future();
297 [promise = std::move(promise)](const auto& image) mutable {
298 promise.set_value(image);
299 }));
300 return future;
301}
void SetNextSceneCallback(const NextSceneCallback &next_scene_callback)
FlutterVulkanImage * image
internal::CopyableLambda< T > MakeCopyable(T lambda)

References image, fml::MakeCopyable(), and SetNextSceneCallback().

◆ GetRendererConfig()

FlutterRendererConfig & flutter::testing::EmbedderTestContext::GetRendererConfig ( )

Definition at line 99 of file embedder_test_context.cc.

99 {
100 return renderer_config_;
101}

References renderer_config_.

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

◆ GetRootSurfaceTransformation()

FlutterTransformation flutter::testing::EmbedderTestContext::GetRootSurfaceTransformation ( )
protected

Definition at line 273 of file embedder_test_context.cc.

273 {
275}
FlutterTransformation FlutterTransformationMake(const flutter::DlMatrix &matrix)

References FlutterTransformationMake(), and root_surface_transformation_.

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

◆ GetSurfacePresentCount()

virtual size_t flutter::testing::EmbedderTestContext::GetSurfacePresentCount ( ) const
pure virtual

◆ GetUpdateSemanticsCallback2Hook()

FlutterUpdateSemanticsCallback2 flutter::testing::EmbedderTestContext::GetUpdateSemanticsCallback2Hook ( )
protected

Definition at line 177 of file embedder_test_context.cc.

177 {
178 if (update_semantics_callback2_ == nullptr) {
179 return nullptr;
180 }
181
182 return [](const FlutterSemanticsUpdate2* update, void* user_data) {
183 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
184 if (context->update_semantics_callback2_) {
185 context->update_semantics_callback2_(update);
186 }
187 };
188}
SemanticsUpdateCallback2 update_semantics_callback2_
A batch of updates to semantics nodes and custom actions.
Definition embedder.h:1796

References update_semantics_callback2_, and user_data.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSemanticsCallbackHooks().

◆ GetUpdateSemanticsCallbackHook()

FlutterUpdateSemanticsCallback flutter::testing::EmbedderTestContext::GetUpdateSemanticsCallbackHook ( )
protected

Definition at line 191 of file embedder_test_context.cc.

191 {
192 if (update_semantics_callback_ == nullptr) {
193 return nullptr;
194 }
195
196 return [](const FlutterSemanticsUpdate* update, void* user_data) {
197 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
198 if (context->update_semantics_callback_) {
199 context->update_semantics_callback_(update);
200 }
201 };
202}

References update_semantics_callback_, and user_data.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSemanticsCallbackHooks().

◆ GetUpdateSemanticsCustomActionCallbackHook()

FlutterUpdateSemanticsCustomActionCallback flutter::testing::EmbedderTestContext::GetUpdateSemanticsCustomActionCallbackHook ( )
protected

Definition at line 219 of file embedder_test_context.cc.

219 {
221 return nullptr;
222 }
223
224 return [](const FlutterSemanticsCustomAction* action, void* user_data) {
225 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
226 if (context->update_semantics_custom_action_callback_) {
227 context->update_semantics_custom_action_callback_(action);
228 }
229 };
230}
SemanticsActionCallback update_semantics_custom_action_callback_

References action, update_semantics_custom_action_callback_, and user_data.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSemanticsCallbackHooks().

◆ GetUpdateSemanticsNodeCallbackHook()

FlutterUpdateSemanticsNodeCallback flutter::testing::EmbedderTestContext::GetUpdateSemanticsNodeCallbackHook ( )
protected

Definition at line 205 of file embedder_test_context.cc.

205 {
206 if (update_semantics_node_callback_ == nullptr) {
207 return nullptr;
208 }
209
210 return [](const FlutterSemanticsNode* semantics_node, void* user_data) {
211 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
212 if (context->update_semantics_node_callback_) {
213 context->update_semantics_node_callback_(semantics_node);
214 }
215 };
216}

References update_semantics_node_callback_, and user_data.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSemanticsCallbackHooks().

◆ GetViewFocusChangeRequestCallbackHook()

FlutterViewFocusChangeRequestCallback flutter::testing::EmbedderTestContext::GetViewFocusChangeRequestCallbackHook ( )
protected

Definition at line 264 of file embedder_test_context.cc.

264 {
265 return [](const FlutterViewFocusChangeRequest* request, void* user_data) {
266 auto context = reinterpret_cast<EmbedderTestContext*>(user_data);
267 if (context->view_focus_change_request_callback_) {
268 context->view_focus_change_request_callback_(request);
269 }
270 };
271}

References user_data, and view_focus_change_request_callback_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetViewFocusChangeRequestHook().

◆ GetVMSnapshotData()

const fml::Mapping * flutter::testing::EmbedderTestContext::GetVMSnapshotData ( ) const

Definition at line 74 of file embedder_test_context.cc.

74 {
75 return vm_snapshot_data_.get();
76}
std::unique_ptr< fml::Mapping > vm_snapshot_data_

References vm_snapshot_data_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSnapshots().

◆ GetVMSnapshotInstructions()

const fml::Mapping * flutter::testing::EmbedderTestContext::GetVMSnapshotInstructions ( ) const

Definition at line 78 of file embedder_test_context.cc.

78 {
79 return vm_snapshot_instructions_.get();
80}
std::unique_ptr< fml::Mapping > vm_snapshot_instructions_

References vm_snapshot_instructions_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetSnapshots().

◆ PlatformMessageCallback()

void flutter::testing::EmbedderTestContext::PlatformMessageCallback ( const FlutterPlatformMessage message)
protected

Definition at line 164 of file embedder_test_context.cc.

165 {
168 }
169}
std::function< void(const FlutterPlatformMessage *)> platform_message_callback_

References message, and platform_message_callback_.

◆ RunVsyncCallback()

void flutter::testing::EmbedderTestContext::RunVsyncCallback ( intptr_t  baton)

Definition at line 319 of file embedder_test_context.cc.

319 {
320 vsync_callback_(baton);
321}
std::function< void(intptr_t)> vsync_callback_

References vsync_callback_.

Referenced by flutter::testing::EmbedderConfigBuilder::SetupVsyncCallback().

◆ SetChannelUpdateCallback()

void flutter::testing::EmbedderTestContext::SetChannelUpdateCallback ( const ChannelUpdateCallback callback)

Definition at line 154 of file embedder_test_context.cc.

References callback, and channel_update_callback_.

◆ SetLogMessageCallback()

void flutter::testing::EmbedderTestContext::SetLogMessageCallback ( const LogMessageCallback log_message_callback)

Definition at line 171 of file embedder_test_context.cc.

References callback, and log_message_callback_.

◆ SetNativeResolver()

void flutter::testing::EmbedderTestContext::SetNativeResolver ( )
protected

◆ SetNextSceneCallback()

void flutter::testing::EmbedderTestContext::SetNextSceneCallback ( const NextSceneCallback next_scene_callback)
protected

Definition at line 284 of file embedder_test_context.cc.

285 {
286 if (compositor_) {
287 compositor_->SetNextSceneCallback(next_scene_callback);
288 return;
289 }
290 next_scene_callback_ = next_scene_callback;
291}

References compositor_, next_scene_callback_, and flutter::testing::EmbedderTestCompositor::SetNextSceneCallback().

Referenced by GetNextSceneImage().

◆ SetPlatformMessageCallback()

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

◆ SetRootSurfaceTransformation()

void flutter::testing::EmbedderTestContext::SetRootSurfaceTransformation ( DlMatrix  matrix)

Definition at line 95 of file embedder_test_context.cc.

95 {
97}

References root_surface_transformation_.

◆ SetSemanticsCustomActionCallback()

void flutter::testing::EmbedderTestContext::SetSemanticsCustomActionCallback ( SemanticsActionCallback  semantics_custom_action)

Definition at line 143 of file embedder_test_context.cc.

144 {
146 std::move(update_semantics_custom_action_callback);
147}

References update_semantics_custom_action_callback_.

◆ SetSemanticsNodeCallback()

void flutter::testing::EmbedderTestContext::SetSemanticsNodeCallback ( SemanticsNodeCallback  update_semantics_node)

Definition at line 138 of file embedder_test_context.cc.

139 {
140 update_semantics_node_callback_ = std::move(update_semantics_node_callback);
141}

References update_semantics_node_callback_.

◆ SetSemanticsUpdateCallback()

void flutter::testing::EmbedderTestContext::SetSemanticsUpdateCallback ( SemanticsUpdateCallback  update_semantics)

Definition at line 133 of file embedder_test_context.cc.

134 {
135 update_semantics_callback_ = std::move(update_semantics_callback);
136}

References update_semantics_callback_.

◆ SetSemanticsUpdateCallback2()

void flutter::testing::EmbedderTestContext::SetSemanticsUpdateCallback2 ( SemanticsUpdateCallback2  update_semantics)

Definition at line 128 of file embedder_test_context.cc.

129 {
130 update_semantics_callback2_ = std::move(update_semantics_callback);
131}

References update_semantics_callback2_.

◆ SetSurface()

virtual void flutter::testing::EmbedderTestContext::SetSurface ( DlISize  surface_size)
protectedpure virtual

◆ SetupAOTDataIfNecessary()

void flutter::testing::EmbedderTestContext::SetupAOTDataIfNecessary ( )
protected

Definition at line 52 of file embedder_test_context.cc.

52 {
54 return;
55 }
56 FlutterEngineAOTDataSource data_in = {};
57 FlutterEngineAOTData data_out = nullptr;
58
59 const auto elf_path = fml::paths::JoinPaths(
61
63 data_in.elf_path = elf_path.c_str();
64
65 ASSERT_EQ(FlutterEngineCreateAOTData(&data_in, &data_out), kSuccess);
66
67 aot_data_.reset(data_out);
68}
static bool IsRunningPrecompiledCode()
Checks if VM instances in the process can run precompiled code. This call can be made at any time and...
Definition dart_vm.cc:176
FlutterEngineResult FlutterEngineCreateAOTData(const FlutterEngineAOTDataSource *source, FlutterEngineAOTData *data_out)
Creates the necessary data structures to launch a Flutter Dart application in AOT mode....
Definition embedder.cc:1682
@ kFlutterEngineAOTDataSourceTypeElfPath
Definition embedder.h:2428
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
std::string JoinPaths(std::initializer_list< std::string > components)
Definition paths.cc:14
FlutterEngineAOTDataSourceType type
Definition embedder.h:2434
const char * elf_path
Absolute path to an ELF library file.
Definition embedder.h:2437

References aot_data_, FlutterEngineAOTDataSource::elf_path, FlutterEngineCreateAOTData(), flutter::testing::GetFixturesPath(), flutter::DartVM::IsRunningPrecompiledCode(), fml::paths::JoinPaths(), flutter::testing::kDefaultAOTAppELFFileName, kFlutterEngineAOTDataSourceTypeElfPath, flutter::kSuccess, and FlutterEngineAOTDataSource::type.

Referenced by EmbedderTestContext().

◆ SetupAOTMappingsIfNecessary()

void flutter::testing::EmbedderTestContext::SetupAOTMappingsIfNecessary ( )
protected

◆ SetupCompositor()

virtual void flutter::testing::EmbedderTestContext::SetupCompositor ( )
protectedpure virtual

◆ SetViewFocusChangeRequestCallback()

void flutter::testing::EmbedderTestContext::SetViewFocusChangeRequestCallback ( const ViewFocusChangeRequestCallback callback)

◆ SetVsyncCallback()

void flutter::testing::EmbedderTestContext::SetVsyncCallback ( std::function< void(intptr_t)>  callback)

Definition at line 314 of file embedder_test_context.cc.

315 {
316 vsync_callback_ = std::move(callback);
317}

References callback, and vsync_callback_.

Friends And Related Symbol Documentation

◆ EmbedderConfigBuilder

friend class EmbedderConfigBuilder
friend

Definition at line 123 of file embedder_test_context.h.

Member Data Documentation

◆ aot_data_

UniqueAOTData flutter::testing::EmbedderTestContext::aot_data_
protected

Definition at line 133 of file embedder_test_context.h.

Referenced by GetAOTData(), and SetupAOTDataIfNecessary().

◆ aot_symbols_

ELFAOTSymbols flutter::testing::EmbedderTestContext::aot_symbols_
protected

Definition at line 128 of file embedder_test_context.h.

Referenced by SetupAOTMappingsIfNecessary().

◆ assets_path_

std::string flutter::testing::EmbedderTestContext::assets_path_
protected

Definition at line 127 of file embedder_test_context.h.

Referenced by GetAssetsPath().

◆ channel_update_callback_

ChannelUpdateCallback flutter::testing::EmbedderTestContext::channel_update_callback_
protected

◆ compositor_

std::unique_ptr<EmbedderTestCompositor> flutter::testing::EmbedderTestContext::compositor_
protected

Definition at line 145 of file embedder_test_context.h.

Referenced by GetCompositor(), and SetNextSceneCallback().

◆ isolate_create_callbacks_

std::vector<fml::closure> flutter::testing::EmbedderTestContext::isolate_create_callbacks_
protected

◆ isolate_snapshot_data_

std::unique_ptr<fml::Mapping> flutter::testing::EmbedderTestContext::isolate_snapshot_data_
protected

Definition at line 131 of file embedder_test_context.h.

Referenced by GetIsolateSnapshotData(), and SetupAOTMappingsIfNecessary().

◆ isolate_snapshot_instructions_

std::unique_ptr<fml::Mapping> flutter::testing::EmbedderTestContext::isolate_snapshot_instructions_
protected

◆ log_message_callback_

LogMessageCallback flutter::testing::EmbedderTestContext::log_message_callback_
protected

Definition at line 144 of file embedder_test_context.h.

Referenced by GetLogMessageCallbackHook(), and SetLogMessageCallback().

◆ native_resolver_

std::shared_ptr<TestDartNativeResolver> flutter::testing::EmbedderTestContext::native_resolver_
protected

Definition at line 135 of file embedder_test_context.h.

Referenced by AddNativeCallback(), and EmbedderTestContext().

◆ next_scene_callback_

NextSceneCallback flutter::testing::EmbedderTestContext::next_scene_callback_
protected

◆ platform_message_callback_

std::function<void(const FlutterPlatformMessage*)> flutter::testing::EmbedderTestContext::platform_message_callback_
protected

Definition at line 143 of file embedder_test_context.h.

Referenced by PlatformMessageCallback(), and SetPlatformMessageCallback().

◆ renderer_config_

◆ root_surface_transformation_

DlMatrix flutter::testing::EmbedderTestContext::root_surface_transformation_
protected

◆ update_semantics_callback2_

SemanticsUpdateCallback2 flutter::testing::EmbedderTestContext::update_semantics_callback2_
protected

◆ update_semantics_callback_

SemanticsUpdateCallback flutter::testing::EmbedderTestContext::update_semantics_callback_
protected

◆ update_semantics_custom_action_callback_

SemanticsActionCallback flutter::testing::EmbedderTestContext::update_semantics_custom_action_callback_
protected

◆ update_semantics_node_callback_

SemanticsNodeCallback flutter::testing::EmbedderTestContext::update_semantics_node_callback_
protected

◆ view_focus_change_request_callback_

ViewFocusChangeRequestCallback flutter::testing::EmbedderTestContext::view_focus_change_request_callback_
protected

◆ vm_snapshot_data_

std::unique_ptr<fml::Mapping> flutter::testing::EmbedderTestContext::vm_snapshot_data_
protected

Definition at line 129 of file embedder_test_context.h.

Referenced by GetVMSnapshotData(), and SetupAOTMappingsIfNecessary().

◆ vm_snapshot_instructions_

std::unique_ptr<fml::Mapping> flutter::testing::EmbedderTestContext::vm_snapshot_instructions_
protected

◆ vsync_callback_

std::function<void(intptr_t)> flutter::testing::EmbedderTestContext::vsync_callback_ = nullptr
protected

Definition at line 148 of file embedder_test_context.h.

Referenced by RunVsyncCallback(), and SetVsyncCallback().


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