#include <embedder_test_compositor.h>
Public Types | |
| 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 | |
| virtual bool | UpdateOffscrenComposition (const FlutterLayer **layers, size_t layers_count)=0 |
| FML_DISALLOW_COPY_AND_ASSIGN (EmbedderTestCompositor) | |
Protected Attributes | |
| std::unique_ptr< EmbedderTestBackingStoreProducer > | backingstore_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::closure > | on_create_render_target_callbacks_ |
| std::vector< fml::closure > | on_collect_render_target_callbacks_ |
| std::vector< fml::closure > | on_present_callbacks_ |
Definition at line 20 of file embedder_test_compositor.h.
| using flutter::testing::EmbedderTestCompositor::NextSceneCallback = std::function<void(sk_sp<SkImage> image)> |
Definition at line 63 of file embedder_test_compositor.h.
| using flutter::testing::EmbedderTestCompositor::PlatformViewRendererCallback = std::function<sk_sp<SkImage>(const FlutterLayer& layer, GrDirectContext* context)> |
Definition at line 22 of file embedder_test_compositor.h.
| using flutter::testing::EmbedderTestCompositor::PresentCallback = std::function<void(FlutterViewId view_id, const FlutterLayer** layers, size_t layers_count)> |
Definition at line 25 of file embedder_test_compositor.h.
| flutter::testing::EmbedderTestCompositor::EmbedderTestCompositor | ( | DlISize | surface_size, |
| sk_sp< GrDirectContext > | context | ||
| ) |
Definition at line 16 of file embedder_test_compositor.cc.
References FML_CHECK, impeller::TSize< T >::IsEmpty(), and surface_size_.
|
virtualdefault |
| void flutter::testing::EmbedderTestCompositor::AddOnCollectRenderTargetCallback | ( | const fml::closure & | callback | ) |
Definition at line 128 of file embedder_test_compositor.cc.
References callback, and on_collect_render_target_callbacks_.
| void flutter::testing::EmbedderTestCompositor::AddOnCreateRenderTargetCallback | ( | const fml::closure & | callback | ) |
Definition at line 123 of file embedder_test_compositor.cc.
References callback, and on_create_render_target_callbacks_.
| void flutter::testing::EmbedderTestCompositor::AddOnPresentCallback | ( | const fml::closure & | callback | ) |
Definition at line 133 of file embedder_test_compositor.cc.
References callback, and on_present_callbacks_.
| bool flutter::testing::EmbedderTestCompositor::CollectBackingStore | ( | const FlutterBackingStore * | backing_store | ) |
Definition at line 43 of file embedder_test_compositor.cc.
References backing_stores_collected_, flutter::testing::InvokeAllCallbacks(), and on_collect_render_target_callbacks_.
| bool flutter::testing::EmbedderTestCompositor::CreateBackingStore | ( | const FlutterBackingStoreConfig * | config, |
| FlutterBackingStore * | backing_store_out | ||
| ) |
Definition at line 32 of file embedder_test_compositor.cc.
References backing_stores_created_, backingstore_producer_, flutter::testing::InvokeAllCallbacks(), and on_create_render_target_callbacks_.
|
protected |
| size_t flutter::testing::EmbedderTestCompositor::GetBackingStoresCollectedCount | ( | ) | const |
Definition at line 119 of file embedder_test_compositor.cc.
References backing_stores_collected_.
| size_t flutter::testing::EmbedderTestCompositor::GetBackingStoresCreatedCount | ( | ) | const |
Definition at line 115 of file embedder_test_compositor.cc.
References backing_stores_created_.
| sk_sp< GrDirectContext > flutter::testing::EmbedderTestCompositor::GetGrContext | ( | ) |
Definition at line 138 of file embedder_test_compositor.cc.
References context_.
| sk_sp< SkImage > flutter::testing::EmbedderTestCompositor::GetLastComposition | ( | ) |
Definition at line 59 of file embedder_test_compositor.cc.
References last_composition_.
| size_t flutter::testing::EmbedderTestCompositor::GetPendingBackingStoresCount | ( | ) | const |
Definition at line 110 of file embedder_test_compositor.cc.
References backing_stores_collected_, backing_stores_created_, and FML_CHECK.
| sk_sp< SkSurface > flutter::testing::EmbedderTestCompositor::GetSurface | ( | const FlutterBackingStore * | backing_store | ) | const |
Definition at line 54 of file embedder_test_compositor.cc.
References backingstore_producer_.
| bool flutter::testing::EmbedderTestCompositor::Present | ( | FlutterViewId | view_id, |
| const FlutterLayer ** | layers, | ||
| size_t | layers_count | ||
| ) |
Definition at line 63 of file embedder_test_compositor.cc.
References callback, FML_LOG, flutter::testing::InvokeAllCallbacks(), layers, layers_count, on_present_callbacks_, present_callback_, present_callback_is_one_shot_, UpdateOffscrenComposition(), and view_id.
Referenced by flutter::testing::EmbedderConfigBuilder::SetCompositor().
| void flutter::testing::EmbedderTestCompositor::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.
| [in] | next_present_callback | The next present callback |
Definition at line 86 of file embedder_test_compositor.cc.
References SetPresentCallback().
| void flutter::testing::EmbedderTestCompositor::SetNextSceneCallback | ( | const NextSceneCallback & | next_scene_callback | ) |
Definition at line 99 of file embedder_test_compositor.cc.
References FML_CHECK, and next_scene_callback_.
Referenced by flutter::testing::EmbedderTestContext::SetNextSceneCallback().
| void flutter::testing::EmbedderTestCompositor::SetPlatformViewRendererCallback | ( | const PlatformViewRendererCallback & | callback | ) |
Definition at line 105 of file embedder_test_compositor.cc.
References callback, and platform_view_renderer_callback_.
| void flutter::testing::EmbedderTestCompositor::SetPresentCallback | ( | const PresentCallback & | present_callback, |
| bool | one_shot | ||
| ) |
Definition at line 91 of file embedder_test_compositor.cc.
References FML_CHECK, present_callback_, and present_callback_is_one_shot_.
Referenced by SetNextPresentCallback().
|
pure virtual |
|
protectedpure virtual |
Referenced by Present().
|
protected |
Definition at line 97 of file embedder_test_compositor.h.
Referenced by CollectBackingStore(), GetBackingStoresCollectedCount(), and GetPendingBackingStoresCount().
|
protected |
Definition at line 96 of file embedder_test_compositor.h.
Referenced by CreateBackingStore(), GetBackingStoresCreatedCount(), and GetPendingBackingStoresCount().
|
protected |
Definition at line 87 of file embedder_test_compositor.h.
Referenced by CreateBackingStore(), GetSurface(), flutter::testing::EmbedderTestCompositorGL::SetRenderTargetType(), flutter::testing::EmbedderTestCompositorMetal::SetRenderTargetType(), flutter::testing::EmbedderTestCompositorSoftware::SetRenderTargetType(), and flutter::testing::EmbedderTestCompositorVulkan::SetRenderTargetType().
|
protected |
Definition at line 89 of file embedder_test_compositor.h.
Referenced by GetGrContext(), flutter::testing::EmbedderTestCompositorGL::SetRenderTargetType(), flutter::testing::EmbedderTestCompositorMetal::SetRenderTargetType(), flutter::testing::EmbedderTestCompositorSoftware::SetRenderTargetType(), and flutter::testing::EmbedderTestCompositorVulkan::SetRenderTargetType().
|
protected |
Definition at line 95 of file embedder_test_compositor.h.
Referenced by GetLastComposition().
|
protected |
Definition at line 94 of file embedder_test_compositor.h.
Referenced by SetNextSceneCallback().
|
protected |
Definition at line 99 of file embedder_test_compositor.h.
Referenced by AddOnCollectRenderTargetCallback(), and CollectBackingStore().
|
protected |
Definition at line 98 of file embedder_test_compositor.h.
Referenced by AddOnCreateRenderTargetCallback(), and CreateBackingStore().
|
protected |
Definition at line 100 of file embedder_test_compositor.h.
Referenced by AddOnPresentCallback(), and Present().
|
protected |
Definition at line 91 of file embedder_test_compositor.h.
Referenced by SetPlatformViewRendererCallback().
|
protected |
Definition at line 93 of file embedder_test_compositor.h.
Referenced by Present(), and SetPresentCallback().
|
protected |
Definition at line 92 of file embedder_test_compositor.h.
Referenced by Present(), and SetPresentCallback().
|
protected |
Definition at line 88 of file embedder_test_compositor.h.
Referenced by EmbedderTestCompositor().