Flutter Engine
The Flutter Engine
|
The external view embedder used by the generic embedder API. This class acts a proxy between the rasterizer and the embedder when the rasterizer is rendering into multiple layers. It asks the embedder for the render targets for the various layers the rasterizer is rendering into, recycles the render targets as necessary and converts rasterizer specific metadata into an embedder friendly format so that it can present the layers on-screen. More...
#include <embedder_external_view_embedder.h>
Public Types | |
using | CreateRenderTargetCallback = std::function< std::unique_ptr< EmbedderRenderTarget >(GrDirectContext *context, const std::shared_ptr< impeller::AiksContext > &aiks_context, const FlutterBackingStoreConfig &config)> |
using | PresentCallback = std::function< bool(FlutterViewId view_id, const std::vector< const FlutterLayer * > &layers)> |
using | SurfaceTransformationCallback = std::function< SkMatrix(void)> |
Public Member Functions | |
EmbedderExternalViewEmbedder (bool avoid_backing_store_cache, const CreateRenderTargetCallback &create_render_target_callback, const PresentCallback &present_callback) | |
Creates an external view embedder used by the generic embedder API. More... | |
~EmbedderExternalViewEmbedder () override | |
Collects the external view embedder. More... | |
void | CollectView (int64_t view_id) override |
void | SetSurfaceTransformationCallback (SurfaceTransformationCallback surface_transformation_callback) |
Sets the surface transformation callback used by the external view embedder to ask the platform for the per frame root surface transformation. More... | |
Public Member Functions inherited from flutter::ExternalViewEmbedder | |
ExternalViewEmbedder ()=default | |
virtual | ~ExternalViewEmbedder ()=default |
virtual void | CollectView (int64_t view_id) |
virtual DlCanvas * | GetRootCanvas ()=0 |
virtual void | CancelFrame ()=0 |
virtual void | BeginFrame (GrDirectContext *context, const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger)=0 |
virtual void | PrerollCompositeEmbeddedView (int64_t platform_view_id, std::unique_ptr< EmbeddedViewParams > params)=0 |
virtual PostPrerollResult | PostPrerollAction (const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger) |
virtual DlCanvas * | CompositeEmbeddedView (int64_t platform_view_id)=0 |
virtual void | PrepareFlutterView (SkISize frame_size, double device_pixel_ratio)=0 |
virtual void | SubmitFlutterView (int64_t flutter_view_id, GrDirectContext *context, const std::shared_ptr< impeller::AiksContext > &aiks_context, std::unique_ptr< SurfaceFrame > frame) |
virtual void | EndFrame (bool should_resubmit_frame, const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger) |
virtual bool | SupportsDynamicThreadMerging () |
virtual void | Teardown () |
void | SetUsedThisFrame (bool used_this_frame) |
bool | GetUsedThisFrame () const |
virtual void | PushVisitedPlatformView (int64_t platform_view_id) |
virtual void | PushFilterToVisitedPlatformViews (const std::shared_ptr< const DlImageFilter > &filter, const SkRect &filter_rect) |
The external view embedder used by the generic embedder API. This class acts a proxy between the rasterizer and the embedder when the rasterizer is rendering into multiple layers. It asks the embedder for the render targets for the various layers the rasterizer is rendering into, recycles the render targets as necessary and converts rasterizer specific metadata into an embedder friendly format so that it can present the layers on-screen.
Definition at line 30 of file embedder_external_view_embedder.h.
using flutter::EmbedderExternalViewEmbedder::CreateRenderTargetCallback = std::function<std::unique_ptr<EmbedderRenderTarget>( GrDirectContext* context, const std::shared_ptr<impeller::AiksContext>& aiks_context, const FlutterBackingStoreConfig& config)> |
Definition at line 32 of file embedder_external_view_embedder.h.
using flutter::EmbedderExternalViewEmbedder::PresentCallback = std::function<bool(FlutterViewId view_id, const std::vector<const FlutterLayer*>& layers)> |
Definition at line 37 of file embedder_external_view_embedder.h.
using flutter::EmbedderExternalViewEmbedder::SurfaceTransformationCallback = std::function<SkMatrix(void)> |
Definition at line 40 of file embedder_external_view_embedder.h.
flutter::EmbedderExternalViewEmbedder::EmbedderExternalViewEmbedder | ( | bool | avoid_backing_store_cache, |
const CreateRenderTargetCallback & | create_render_target_callback, | ||
const PresentCallback & | present_callback | ||
) |
Creates an external view embedder used by the generic embedder API.
[in] | avoid_backing_store_cache | If set, create_render_target_callback will beinvoked every frame for every engine composited layer. The result will not cached. |
[in] | create_render_target_callback | The render target callback used to request the render target for a layer. |
[in] | present_callback | The callback used to forward a collection of layers (backed by fulfilled render targets) to the embedder for presentation. |
Definition at line 19 of file embedder_external_view_embedder.cc.
|
overridedefault |
Collects the external view embedder.
|
overridevirtual |
Reimplemented from flutter::ExternalViewEmbedder.
Definition at line 32 of file embedder_external_view_embedder.cc.
void flutter::EmbedderExternalViewEmbedder::SetSurfaceTransformationCallback | ( | SurfaceTransformationCallback | surface_transformation_callback | ) |
Sets the surface transformation callback used by the external view embedder to ask the platform for the per frame root surface transformation.
[in] | surface_transformation_callback | The surface transformation callback |
Definition at line 36 of file embedder_external_view_embedder.cc.