Flutter Engine
flutter::GPUSurfaceSoftwareDelegate Class Referenceabstract

Interface implemented by all platform surfaces that can present a software backing store to the "screen". The GPU surface abstraction (which abstracts the client rendering API) uses this delegation pattern to tell the platform surface (which abstracts how backing stores fulfilled by the selected client rendering API end up on the "screen" on a particular platform) when the rasterizer needs to allocate and present the software backing store. More...

#include <gpu_surface_software_delegate.h>

Inheritance diagram for flutter::GPUSurfaceSoftwareDelegate:
flutter::GPUSurfaceDelegate flutter::AndroidSurfaceSoftware flutter::EmbedderSurfaceSoftware flutter::IOSSurfaceSoftware

Public Member Functions

 ~GPUSurfaceSoftwareDelegate () override
 
ExternalViewEmbedderGetExternalViewEmbedder () override
 Gets the view embedder that controls how the Flutter layer hierarchy split into multiple chunks should be composited back on-screen. This field is optional and the Flutter rasterizer will render into a single on-screen surface if this call returns a null external view embedder. This happens on the GPU thread. More...
 
virtual sk_sp< SkSurface > AcquireBackingStore (const SkISize &size)=0
 Called when the GPU surface needs a new buffer to render a new frame into. More...
 
virtual bool PresentBackingStore (sk_sp< SkSurface > backing_store)=0
 Called by the platform when a frame has been rendered into the backing store and the platform must display it on-screen. More...
 
- Public Member Functions inherited from flutter::GPUSurfaceDelegate
virtual ~GPUSurfaceDelegate ()
 

Detailed Description

Interface implemented by all platform surfaces that can present a software backing store to the "screen". The GPU surface abstraction (which abstracts the client rendering API) uses this delegation pattern to tell the platform surface (which abstracts how backing stores fulfilled by the selected client rendering API end up on the "screen" on a particular platform) when the rasterizer needs to allocate and present the software backing store.

See also
|IOSurfaceSoftware|, |AndroidSurfaceSoftware|, |EmbedderSurfaceSoftware|.

Definition at line 28 of file gpu_surface_software_delegate.h.

Constructor & Destructor Documentation

◆ ~GPUSurfaceSoftwareDelegate()

flutter::GPUSurfaceSoftwareDelegate::~GPUSurfaceSoftwareDelegate ( )
overridedefault

Member Function Documentation

◆ AcquireBackingStore()

virtual sk_sp<SkSurface> flutter::GPUSurfaceSoftwareDelegate::AcquireBackingStore ( const SkISize &  size)
pure virtual

Called when the GPU surface needs a new buffer to render a new frame into.

Parameters
[in]sizeThe size of the frame.
Returns
A raster surface returned by the platform.

Implemented in flutter::AndroidSurfaceSoftware, and flutter::IOSSurfaceSoftware.

Referenced by flutter::GPUSurfaceSoftware::AcquireFrame().

◆ GetExternalViewEmbedder()

ExternalViewEmbedder * flutter::GPUSurfaceSoftwareDelegate::GetExternalViewEmbedder ( )
overridevirtual

Gets the view embedder that controls how the Flutter layer hierarchy split into multiple chunks should be composited back on-screen. This field is optional and the Flutter rasterizer will render into a single on-screen surface if this call returns a null external view embedder. This happens on the GPU thread.

Returns
The external view embedder, or, null if Flutter is rendering into a single on-screen surface.

Implements flutter::GPUSurfaceDelegate.

Reimplemented in flutter::AndroidSurfaceSoftware, and flutter::IOSSurfaceSoftware.

Definition at line 11 of file gpu_surface_software_delegate.cc.

Referenced by flutter::GPUSurfaceSoftware::GetExternalViewEmbedder().

11  {
12  return nullptr;
13 }

◆ PresentBackingStore()

virtual bool flutter::GPUSurfaceSoftwareDelegate::PresentBackingStore ( sk_sp< SkSurface >  backing_store)
pure virtual

Called by the platform when a frame has been rendered into the backing store and the platform must display it on-screen.

Parameters
[in]backing_storeThe software backing store to present.
Returns
Returns if the platform could present the backing store onto the screen.

Implemented in flutter::AndroidSurfaceSoftware, and flutter::IOSSurfaceSoftware.


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