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

#include <embedder_test_compositor_software.h>

Inheritance diagram for flutter::testing::EmbedderTestCompositorSoftware:
flutter::testing::EmbedderTestCompositor

Public Member Functions

 EmbedderTestCompositorSoftware (DlISize surface_size)
 
 ~EmbedderTestCompositorSoftware () override
 
void SetRenderTargetType (EmbedderTestBackingStoreProducer::RenderTargetType type, FlutterSoftwarePixelFormat software_pixfmt) override
 
- Public Member Functions inherited from flutter::testing::EmbedderTestCompositor
 EmbedderTestCompositor (DlISize surface_size, sk_sp< GrDirectContext > context)
 
virtual ~EmbedderTestCompositor ()
 
bool CreateBackingStore (const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out)
 
bool CollectBackingStore (const FlutterBackingStore *backing_store)
 
bool Present (FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)
 
void SetPlatformViewRendererCallback (const PlatformViewRendererCallback &callback)
 
sk_sp< SkSurface > GetSurface (const FlutterBackingStore *backing_store) const
 
void SetNextPresentCallback (const PresentCallback &next_present_callback)
 Allows tests to install a callback to notify them when the entire render tree has been finalized so they can run their assertions.
 
void SetPresentCallback (const PresentCallback &present_callback, bool one_shot)
 
void SetNextSceneCallback (const NextSceneCallback &next_scene_callback)
 
sk_sp< SkImage > GetLastComposition ()
 
size_t GetPendingBackingStoresCount () const
 
size_t GetBackingStoresCreatedCount () const
 
size_t GetBackingStoresCollectedCount () const
 
void AddOnCreateRenderTargetCallback (const fml::closure &callback)
 
void AddOnCollectRenderTargetCallback (const fml::closure &callback)
 
void AddOnPresentCallback (const fml::closure &callback)
 
sk_sp< GrDirectContext > GetGrContext ()
 

Additional Inherited Members

- Public Types inherited from flutter::testing::EmbedderTestCompositor
using PlatformViewRendererCallback = std::function< sk_sp< SkImage >(const FlutterLayer &layer, GrDirectContext *context)>
 
using PresentCallback = std::function< void(FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)>
 
using NextSceneCallback = std::function< void(sk_sp< SkImage > image)>
 
- Protected Member Functions inherited from flutter::testing::EmbedderTestCompositor
 FML_DISALLOW_COPY_AND_ASSIGN (EmbedderTestCompositor)
 
- Protected Attributes inherited from flutter::testing::EmbedderTestCompositor
std::unique_ptr< EmbedderTestBackingStoreProducerbackingstore_producer_
 
const DlISize surface_size_
 
sk_sp< GrDirectContext > context_
 
PlatformViewRendererCallback platform_view_renderer_callback_
 
bool present_callback_is_one_shot_ = false
 
PresentCallback present_callback_
 
NextSceneCallback next_scene_callback_
 
sk_sp< SkImage > last_composition_
 
size_t backing_stores_created_ = 0
 
size_t backing_stores_collected_ = 0
 
std::vector< fml::closureon_create_render_target_callbacks_
 
std::vector< fml::closureon_collect_render_target_callbacks_
 
std::vector< fml::closureon_present_callbacks_
 

Detailed Description

Definition at line 13 of file embedder_test_compositor_software.h.

Constructor & Destructor Documentation

◆ EmbedderTestCompositorSoftware()

flutter::testing::EmbedderTestCompositorSoftware::EmbedderTestCompositorSoftware ( DlISize  surface_size)
explicit

Definition at line 15 of file embedder_test_compositor_software.cc.

17 : EmbedderTestCompositor(surface_size, nullptr) {}
EmbedderTestCompositor(DlISize surface_size, sk_sp< GrDirectContext > context)

◆ ~EmbedderTestCompositorSoftware()

flutter::testing::EmbedderTestCompositorSoftware::~EmbedderTestCompositorSoftware ( )
overridedefault

Member Function Documentation

◆ SetRenderTargetType()

void flutter::testing::EmbedderTestCompositorSoftware::SetRenderTargetType ( EmbedderTestBackingStoreProducer::RenderTargetType  type,
FlutterSoftwarePixelFormat  software_pixfmt 
)
overridevirtual

Implements flutter::testing::EmbedderTestCompositor.

Definition at line 21 of file embedder_test_compositor_software.cc.

23 {
24 switch (type) {
28 std::make_unique<EmbedderTestBackingStoreProducerSoftware>(
29 context_, type, software_pixfmt);
30 return;
36 FML_LOG(FATAL) << "Unsupported render target type: "
37 << static_cast<int>(type);
38 return;
39 }
40}
GLenum type
std::unique_ptr< EmbedderTestBackingStoreProducer > backingstore_producer_
#define FML_LOG(severity)
Definition logging.h:101

References flutter::testing::EmbedderTestCompositor::backingstore_producer_, flutter::testing::EmbedderTestCompositor::context_, FML_LOG, flutter::testing::EmbedderTestBackingStoreProducer::kMetalTexture, flutter::testing::EmbedderTestBackingStoreProducer::kOpenGLFramebuffer, flutter::testing::EmbedderTestBackingStoreProducer::kOpenGLSurface, flutter::testing::EmbedderTestBackingStoreProducer::kOpenGLTexture, flutter::testing::EmbedderTestBackingStoreProducer::kSoftwareBuffer, flutter::testing::EmbedderTestBackingStoreProducer::kSoftwareBuffer2, flutter::testing::EmbedderTestBackingStoreProducer::kVulkanImage, and type.


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