5#ifndef FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_H_
15#include "flutter/fml/closure.h"
16#include "flutter/fml/macros.h"
17#include "flutter/fml/mapping.h"
18#include "flutter/shell/platform/embedder/embedder.h"
19#include "flutter/shell/platform/embedder/tests/embedder_test_compositor.h"
20#include "flutter/testing/elf_loader.h"
21#include "flutter/testing/test_dart_native_resolver.h"
46using UniqueAOTData = std::unique_ptr<_FlutterEngineAOTData, AOTDataDeleter>;
119#ifdef SHELL_ENABLE_VULKAN
void RunVsyncCallback(intptr_t baton)
void SetSemanticsCustomActionCallback(SemanticsActionCallback semantics_custom_action)
const fml::Mapping * GetIsolateSnapshotData() const
std::vector< fml::closure > isolate_create_callbacks_
ChannelUpdateCallback channel_update_callback_
virtual EmbedderTestContextType GetContextType() const =0
const fml::Mapping * GetVMSnapshotInstructions() const
void SetupAOTDataIfNecessary()
void AddNativeCallback(const char *name, Dart_NativeFunction function)
EmbedderTestCompositor & GetCompositor()
std::function< void(const FlutterPlatformMessage *)> platform_message_callback_
FlutterUpdateSemanticsNodeCallback GetUpdateSemanticsNodeCallbackHook()
std::unique_ptr< fml::Mapping > isolate_snapshot_instructions_
virtual ~EmbedderTestContext()
std::function< void(intptr_t)> vsync_callback_
void SetupAOTMappingsIfNecessary()
void SetSemanticsUpdateCallback(SemanticsUpdateCallback update_semantics)
std::shared_ptr< TestDartNativeResolver > native_resolver_
std::unique_ptr< fml::Mapping > vm_snapshot_data_
void SetVsyncCallback(std::function< void(intptr_t)> callback)
void FireIsolateCreateCallbacks()
const fml::Mapping * GetIsolateSnapshotInstructions() const
virtual size_t GetSurfacePresentCount() const =0
static FlutterLogMessageCallback GetLogMessageCallbackHook()
const std::string & GetAssetsPath() const
void SetSemanticsNodeCallback(SemanticsNodeCallback update_semantics_node)
SemanticsUpdateCallback update_semantics_callback_
std::unique_ptr< fml::Mapping > vm_snapshot_instructions_
static VoidCallback GetIsolateCreateCallbackHook()
ELFAOTSymbols aot_symbols_
void SetPlatformMessageCallback(const std::function< void(const FlutterPlatformMessage *)> &callback)
static FlutterComputePlatformResolvedLocaleCallback GetComputePlatformResolvedLocaleCallbackHook()
void SetChannelUpdateCallback(const ChannelUpdateCallback &callback)
void AddIsolateCreateCallback(const fml::closure &closure)
LogMessageCallback log_message_callback_
FlutterEngineAOTData GetAOTData() const
void SetNextSceneCallback(const NextSceneCallback &next_scene_callback)
SemanticsNodeCallback update_semantics_node_callback_
FlutterTransformation GetRootSurfaceTransformation()
void SetLogMessageCallback(const LogMessageCallback &log_message_callback)
std::unique_ptr< EmbedderTestCompositor > compositor_
EmbedderTestContext(std::string assets_path="")
virtual void SetupCompositor()=0
void SetRootSurfaceTransformation(SkMatrix matrix)
SkMatrix root_surface_transformation_
NextSceneCallback next_scene_callback_
void SetSemanticsUpdateCallback2(SemanticsUpdateCallback2 update_semantics)
std::unique_ptr< fml::Mapping > isolate_snapshot_data_
std::function< void(sk_sp< SkImage > image)> NextSceneCallback
FlutterUpdateSemanticsCustomActionCallback GetUpdateSemanticsCustomActionCallbackHook()
std::future< sk_sp< SkImage > > GetNextSceneImage()
SemanticsUpdateCallback2 update_semantics_callback2_
FlutterUpdateSemanticsCallback2 GetUpdateSemanticsCallback2Hook()
FML_DISALLOW_COPY_AND_ASSIGN(EmbedderTestContext)
FlutterUpdateSemanticsCallback GetUpdateSemanticsCallbackHook()
SemanticsActionCallback update_semantics_custom_action_callback_
void PlatformMessageCallback(const FlutterPlatformMessage *message)
FlutterChannelUpdateCallback GetChannelUpdateCallbackHook()
const fml::Mapping * GetVMSnapshotData() const
void FireRootSurfacePresentCallbackIfPresent(const std::function< sk_sp< SkImage >(void)> &image_callback)
virtual void SetupSurface(SkISize surface_size)=0
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
FlutterEngineResult FlutterEngineCollectAOTData(FlutterEngineAOTData data)
Collects the AOT data.
void(* FlutterUpdateSemanticsCustomActionCallback)(const FlutterSemanticsCustomAction *, void *)
void(* FlutterUpdateSemanticsCallback)(const FlutterSemanticsUpdate *, void *)
void(* FlutterLogMessageCallback)(const char *, const char *, void *)
void(* FlutterUpdateSemanticsNodeCallback)(const FlutterSemanticsNode *, void *)
const FlutterLocale *(* FlutterComputePlatformResolvedLocaleCallback)(const FlutterLocale **, size_t)
void(* FlutterUpdateSemanticsCallback2)(const FlutterSemanticsUpdate2 *, void *)
void(* FlutterChannelUpdateCallback)(const FlutterChannelUpdate *, void *)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkImage > image
std::function< void(const FlutterSemanticsCustomAction *)> SemanticsActionCallback
std::function< void(const FlutterSemanticsNode *)> SemanticsNodeCallback
std::unique_ptr< _FlutterEngineAOTData, AOTDataDeleter > UniqueAOTData
std::function< void(const FlutterSemanticsUpdate2 *)> SemanticsUpdateCallback2
std::function< void(const char *tag, const char *message)> LogMessageCallback
std::function< void(const FlutterChannelUpdate *)> ChannelUpdateCallback
std::function< void(const FlutterSemanticsUpdate *)> SemanticsUpdateCallback
DEF_SWITCHES_START aot vmservice shared library name
std::function< void()> closure
An update to whether a message channel has a listener set or not.
A batch of updates to semantics nodes and custom actions.
void operator()(FlutterEngineAOTData aot_data)