Flutter Engine
 
Loading...
Searching...
No Matches
flutter::testing::MockSnapshotDelegate Class Reference
Inheritance diagram for flutter::testing::MockSnapshotDelegate:
flutter::SnapshotDelegate

Public Member Functions

 MockSnapshotDelegate ()
 
 MOCK_METHOD (std::unique_ptr< GpuImageResult >, MakeSkiaGpuImage,(sk_sp< DisplayList >, const SkImageInfo &),(override))
 
 MOCK_METHOD (std::shared_ptr< TextureRegistry >, GetTextureRegistry,(),(override))
 
 MOCK_METHOD (GrDirectContext *, GetGrContext,(),(override))
 
 MOCK_METHOD (void, MakeRasterSnapshot,(sk_sp< DisplayList >, DlISize, std::function< void(sk_sp< DlImage >)>),(override))
 
 MOCK_METHOD (sk_sp< DlImage >, MakeRasterSnapshotSync,(sk_sp< DisplayList >, DlISize),(override))
 
 MOCK_METHOD (sk_sp< SkImage >, ConvertToRasterImage,(sk_sp< SkImage >),(override))
 
 MOCK_METHOD (void, CacheRuntimeStage,(const std::shared_ptr< impeller::RuntimeStage > &),(override))
 
 MOCK_METHOD (bool, MakeRenderContextCurrent,(),(override))
 
fml::TaskRunnerAffineWeakPtr< SnapshotDelegateGetWeakPtr ()
 
- Public Member Functions inherited from flutter::SnapshotDelegate
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 72 of file image_encoding_unittests.cc.

Constructor & Destructor Documentation

◆ MockSnapshotDelegate()

flutter::testing::MockSnapshotDelegate::MockSnapshotDelegate ( )
inline

Definition at line 74 of file image_encoding_unittests.cc.

74: weak_factory_(this) {}

Member Function Documentation

◆ GetWeakPtr()

fml::TaskRunnerAffineWeakPtr< SnapshotDelegate > flutter::testing::MockSnapshotDelegate::GetWeakPtr ( )
inline

Definition at line 105 of file image_encoding_unittests.cc.

105 {
106 return weak_factory_.GetWeakPtr();
107 }

◆ MOCK_METHOD() [1/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( bool  ,
MakeRenderContextCurrent  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [2/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( GrDirectContext *  ,
GetGrContext  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [3/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( sk_sp< DlImage ,
MakeRasterSnapshotSync  ,
(sk_sp< DisplayList >, DlISize ,
(override)   
)

◆ MOCK_METHOD() [4/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( sk_sp< SkImage >  ,
ConvertToRasterImage  ,
(sk_sp< SkImage >)  ,
(override)   
)

◆ MOCK_METHOD() [5/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( std::shared_ptr< TextureRegistry ,
GetTextureRegistry  ,
()  ,
(override)   
)

◆ MOCK_METHOD() [6/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( std::unique_ptr< GpuImageResult ,
MakeSkiaGpuImage  ,
(sk_sp< DisplayList >, const SkImageInfo &)  ,
(override)   
)

◆ MOCK_METHOD() [7/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( void  ,
CacheRuntimeStage  ,
(const std::shared_ptr< impeller::RuntimeStage > &)  ,
(override)   
)

◆ MOCK_METHOD() [8/8]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( void  ,
MakeRasterSnapshot  ,
(sk_sp< DisplayList >, DlISize, std::function< void(sk_sp< DlImage >)>)  ,
(override)   
)

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