Flutter Engine
flutter::testing::EmbedderTestContextSoftware Class Reference

#include <embedder_test_context_software.h>

Inheritance diagram for flutter::testing::EmbedderTestContextSoftware:
flutter::testing::EmbedderTestContext

Public Member Functions

 EmbedderTestContextSoftware (std::string assets_path="")
 
 ~EmbedderTestContextSoftware () override
 
size_t GetSurfacePresentCount () const override
 
bool Present (sk_sp< SkImage > image)
 
- Public Member Functions inherited from flutter::testing::EmbedderTestContext
 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 (SkMatrix matrix)
 
void AddIsolateCreateCallback (fml::closure closure)
 
void AddNativeCallback (const char *name, Dart_NativeFunction function)
 
void SetSemanticsNodeCallback (const SemanticsNodeCallback &update_semantics_node)
 
void SetSemanticsCustomActionCallback (const SemanticsActionCallback &semantics_custom_action)
 
void SetPlatformMessageCallback (const std::function< void(const FlutterPlatformMessage *)> &callback)
 
std::future< sk_sp< SkImage > > GetNextSceneImage ()
 
EmbedderTestCompositorGetCompositor ()
 

Protected Member Functions

virtual void SetupCompositor () override
 
- Protected Member Functions inherited from flutter::testing::EmbedderTestContext
void SetupAOTMappingsIfNecessary ()
 
void SetupAOTDataIfNecessary ()
 
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)
 

Additional Inherited Members

- Protected Types inherited from flutter::testing::EmbedderTestContext
using NextSceneCallback = std::function< void(sk_sp< SkImage > image)>
 
- Static Protected Member Functions inherited from flutter::testing::EmbedderTestContext
static VoidCallback GetIsolateCreateCallbackHook ()
 
static FlutterUpdateSemanticsNodeCallback GetUpdateSemanticsNodeCallbackHook ()
 
static FlutterUpdateSemanticsCustomActionCallback GetUpdateSemanticsCustomActionCallbackHook ()
 
static FlutterComputePlatformResolvedLocaleCallback GetComputePlatformResolvedLocaleCallbackHook ()
 
- Protected Attributes inherited from flutter::testing::EmbedderTestContext
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_
 
SemanticsNodeCallback update_semantics_node_callback_
 
SemanticsActionCallback update_semantics_custom_action_callback_
 
std::function< void(const FlutterPlatformMessage *)> platform_message_callback_
 
std::unique_ptr< EmbedderTestCompositorcompositor_
 
NextSceneCallback next_scene_callback_
 
SkMatrix root_surface_transformation_
 

Detailed Description

Definition at line 13 of file embedder_test_context_software.h.

Constructor & Destructor Documentation

◆ EmbedderTestContextSoftware()

flutter::testing::EmbedderTestContextSoftware::EmbedderTestContextSoftware ( std::string  assets_path = "")

Definition at line 19 of file embedder_test_context_software.cc.

References ~EmbedderTestContextSoftware().

21  : EmbedderTestContext(assets_path) {}
EmbedderTestContext(std::string assets_path="")

◆ ~EmbedderTestContextSoftware()

flutter::testing::EmbedderTestContextSoftware::~EmbedderTestContextSoftware ( )
overridedefault

Member Function Documentation

◆ GetSurfacePresentCount()

size_t flutter::testing::EmbedderTestContextSoftware::GetSurfacePresentCount ( ) const
overridevirtual

Implements flutter::testing::EmbedderTestContext.

Definition at line 33 of file embedder_test_context_software.cc.

33  {
34  return software_surface_present_count_;
35 }

◆ Present()

bool flutter::testing::EmbedderTestContextSoftware::Present ( sk_sp< SkImage >  image)

Definition at line 25 of file embedder_test_context_software.cc.

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

25  {
26  software_surface_present_count_++;
27 
28  FireRootSurfacePresentCallbackIfPresent([image] { return image; });
29 
30  return true;
31 }
void FireRootSurfacePresentCallbackIfPresent(const std::function< sk_sp< SkImage >(void)> &image_callback)

◆ SetupCompositor()

void flutter::testing::EmbedderTestContextSoftware::SetupCompositor ( )
overrideprotectedvirtual

Implements flutter::testing::EmbedderTestContext.

Definition at line 41 of file embedder_test_context_software.cc.

References flutter::testing::EmbedderTestContext::compositor_, and FML_CHECK.

41  {
42  FML_CHECK(!compositor_) << "Already setup a compositor in this context.";
43  compositor_ = std::make_unique<EmbedderTestCompositorSoftware>(surface_size_);
44 }
std::unique_ptr< EmbedderTestCompositor > compositor_
#define FML_CHECK(condition)
Definition: logging.h:68

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