Flutter Engine
 
Loading...
Searching...
No Matches
flutter::SnapshotDelegate Class Referenceabstract

#include <snapshot_delegate.h>

Inheritance diagram for flutter::SnapshotDelegate:
flutter::Rasterizer flutter::testing::MockSnapshotDelegate

Classes

struct  GpuImageResult
 A data structure used by the Skia implementation of deferred GPU based images. More...
 

Public Member Functions

virtual std::unique_ptr< GpuImageResultMakeSkiaGpuImage (sk_sp< DisplayList > display_list, const SkImageInfo &image_info)=0
 Attempts to create a GrBackendTexture for the specified DisplayList. May result in a raster bitmap if no GPU context is available.
 
virtual std::shared_ptr< TextureRegistryGetTextureRegistry ()=0
 Gets the registry of external textures currently in use by the rasterizer. These textures may be updated at a cadence different from that of the Flutter application. When an external texture is referenced in the Flutter layer tree, that texture is composited within the Flutter layer tree.
 
virtual GrDirectContext * GetGrContext ()=0
 
virtual void MakeRasterSnapshot (sk_sp< DisplayList > display_list, DlISize picture_size, std::function< void(sk_sp< DlImage >)> callback)=0
 
virtual sk_sp< DlImageMakeRasterSnapshotSync (sk_sp< DisplayList > display_list, DlISize picture_size)=0
 
virtual sk_sp< SkImage > ConvertToRasterImage (sk_sp< SkImage > image)=0
 
virtual void CacheRuntimeStage (const std::shared_ptr< impeller::RuntimeStage > &runtime_stage)=0
 
virtual bool MakeRenderContextCurrent ()=0
 

Detailed Description

Definition at line 21 of file snapshot_delegate.h.

Member Function Documentation

◆ CacheRuntimeStage()

virtual void flutter::SnapshotDelegate::CacheRuntimeStage ( const std::shared_ptr< impeller::RuntimeStage > &  runtime_stage)
pure virtual

Load and compile and initial PSO for the provided [runtime_stage].

Impeller only.

◆ ConvertToRasterImage()

virtual sk_sp< SkImage > flutter::SnapshotDelegate::ConvertToRasterImage ( sk_sp< SkImage >  image)
pure virtual

◆ GetGrContext()

virtual GrDirectContext * flutter::SnapshotDelegate::GetGrContext ( )
pure virtual

Implemented in flutter::Rasterizer.

◆ GetTextureRegistry()

virtual std::shared_ptr< TextureRegistry > flutter::SnapshotDelegate::GetTextureRegistry ( )
pure virtual

Gets the registry of external textures currently in use by the rasterizer. These textures may be updated at a cadence different from that of the Flutter application. When an external texture is referenced in the Flutter layer tree, that texture is composited within the Flutter layer tree.

Returns
A pointer to the external texture registry.

Implemented in flutter::Rasterizer.

◆ MakeRasterSnapshot()

virtual void flutter::SnapshotDelegate::MakeRasterSnapshot ( sk_sp< DisplayList display_list,
DlISize  picture_size,
std::function< void(sk_sp< DlImage >)>  callback 
)
pure virtual

◆ MakeRasterSnapshotSync()

virtual sk_sp< DlImage > flutter::SnapshotDelegate::MakeRasterSnapshotSync ( sk_sp< DisplayList display_list,
DlISize  picture_size 
)
pure virtual

◆ MakeRenderContextCurrent()

virtual bool flutter::SnapshotDelegate::MakeRenderContextCurrent ( )
pure virtual

Bind a context to the current thread that can execute rendering commands.

Impeller only.

◆ MakeSkiaGpuImage()

virtual std::unique_ptr< GpuImageResult > flutter::SnapshotDelegate::MakeSkiaGpuImage ( sk_sp< DisplayList display_list,
const SkImageInfo &  image_info 
)
pure virtual

Attempts to create a GrBackendTexture for the specified DisplayList. May result in a raster bitmap if no GPU context is available.


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