5#ifndef FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_COMPOSITOR_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_COMPOSITOR_H_
10#include "flutter/fml/closure.h"
11#include "flutter/fml/macros.h"
12#include "flutter/shell/platform/embedder/embedder.h"
13#include "flutter/shell/platform/embedder/tests/embedder_test_backingstore_producer.h"
26 size_t layers_count)>;
33 std::unique_ptr<EmbedderTestBackingStoreProducer> backingstore_producer);
80 size_t layers_count) = 0;
size_t GetBackingStoresCreatedCount() const
void AddOnCreateRenderTargetCallback(const fml::closure &callback)
bool present_callback_is_one_shot_
void AddOnPresentCallback(const fml::closure &callback)
void SetNextSceneCallback(const NextSceneCallback &next_scene_callback)
size_t GetBackingStoresCollectedCount() const
void AddOnCollectRenderTargetCallback(const fml::closure &callback)
std::vector< fml::closure > on_create_render_target_callbacks_
sk_sp< SkImage > GetLastComposition()
std::vector< fml::closure > on_present_callbacks_
EmbedderTestCompositor(SkISize surface_size, sk_sp< GrDirectContext > context)
size_t GetPendingBackingStoresCount() const
std::function< void(FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)> PresentCallback
bool CollectBackingStore(const FlutterBackingStore *backing_store)
std::function< void(sk_sp< SkImage > image)> NextSceneCallback
std::vector< fml::closure > on_collect_render_target_callbacks_
NextSceneCallback next_scene_callback_
sk_sp< GrDirectContext > GetGrContext()
bool CreateBackingStore(const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out)
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 t...
void SetBackingStoreProducer(std::unique_ptr< EmbedderTestBackingStoreProducer > backingstore_producer)
size_t backing_stores_created_
const SkISize surface_size_
bool Present(FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)
sk_sp< GrDirectContext > context_
PresentCallback present_callback_
virtual bool UpdateOffscrenComposition(const FlutterLayer **layers, size_t layers_count)=0
size_t backing_stores_collected_
sk_sp< SkImage > last_composition_
virtual ~EmbedderTestCompositor()
void SetPresentCallback(const PresentCallback &present_callback, bool one_shot)
std::unique_ptr< EmbedderTestBackingStoreProducer > backingstore_producer_
std::function< sk_sp< SkImage >(const FlutterLayer &layer, GrDirectContext *context)> PlatformViewRendererCallback
PlatformViewRendererCallback platform_view_renderer_callback_
void SetPlatformViewRendererCallback(const PlatformViewRendererCallback &callback)
FML_DISALLOW_COPY_AND_ASSIGN(EmbedderTestCompositor)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
sk_sp< const SkImage > image
std::function< void()> closure