Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::testing::MockSnapshotDelegate Class Reference

#include <mocks.h>

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

Public Member Functions

 MockSnapshotDelegate ()
 
virtual ~MockSnapshotDelegate ()=default
 
 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 >)>, SnapshotPixelFormat target_format),(override))
 
 MOCK_METHOD (sk_sp< DlImage >, MakeRasterSnapshotSync,(sk_sp< DisplayList >, DlISize, SnapshotPixelFormat),(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 ()
 
std::shared_ptr< MockTextureRegistryGetMockTextureRegistry ()
 
- 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, SnapshotPixelFormat pixel_format)=0
 
virtual sk_sp< DlImageMakeRasterSnapshotSync (sk_sp< DisplayList > display_list, DlISize picture_size, SnapshotPixelFormat pixel_format)=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 mocks.h.

Constructor & Destructor Documentation

◆ MockSnapshotDelegate()

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

Definition at line 23 of file mocks.h.

24 : weak_factory_(this),
25 texture_registry_(std::make_shared<MockTextureRegistry>()) {}

◆ ~MockSnapshotDelegate()

virtual flutter::testing::MockSnapshotDelegate::~MockSnapshotDelegate ( )
virtualdefault

Member Function Documentation

◆ GetMockTextureRegistry()

std::shared_ptr< MockTextureRegistry > flutter::testing::MockSnapshotDelegate::GetMockTextureRegistry ( )
inline

Definition at line 62 of file mocks.h.

62 {
63 return texture_registry_;
64 }

◆ GetWeakPtr()

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

Definition at line 58 of file mocks.h.

58 {
59 return weak_factory_.GetWeakPtr();
60 }

◆ 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, SnapshotPixelFormat ,
(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 >)>, SnapshotPixelFormat target_format)  ,
(override)   
)

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