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, MakeSkiaSnapshot,(sk_sp< DisplayList >, DlISize, std::function< void(sk_sp< SkImage >)>, SnapshotPixelFormat target_format),(override))
 
 MOCK_METHOD (sk_sp< SkImage >, MakeSkiaSnapshotSync,(sk_sp< DisplayList >, DlISize, SnapshotPixelFormat),(override))
 
 MOCK_METHOD (void, MakeImpellerSnapshot,(sk_sp< DisplayList >, DlISize, std::function< void(std::shared_ptr< impeller::Texture >)>, SnapshotPixelFormat target_format),(override))
 
 MOCK_METHOD (std::shared_ptr< impeller::Texture >, MakeImpellerSnapshotSync,(sk_sp< DisplayList >, DlISize, SnapshotPixelFormat),(override))
 
 MOCK_METHOD (sk_sp< SkImage >, ConvertToRasterImage,(sk_sp< SkImage >),(override))
 
 MOCK_METHOD (sk_sp< SkImage >, MakeSkiaTextureImage,(sk_sp< SkImage >, SnapshotPixelFormat),(override))
 
 MOCK_METHOD (std::shared_ptr< impeller::Texture >, MakeImpellerTextureImage,(sk_sp< SkImage >, SnapshotPixelFormat),(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 MakeSkiaSnapshot (sk_sp< DisplayList > display_list, DlISize picture_size, std::function< void(sk_sp< SkImage >)> callback, SnapshotPixelFormat pixel_format)=0
 
virtual sk_sp< SkImage > MakeSkiaSnapshotSync (sk_sp< DisplayList > display_list, DlISize picture_size, SnapshotPixelFormat pixel_format)=0
 
virtual void MakeImpellerSnapshot (sk_sp< DisplayList > display_list, DlISize picture_size, std::function< void(std::shared_ptr< impeller::Texture >)> callback, SnapshotPixelFormat pixel_format)=0
 
virtual std::shared_ptr< impeller::TextureMakeImpellerSnapshotSync (sk_sp< DisplayList > display_list, DlISize picture_size, SnapshotPixelFormat pixel_format)=0
 
virtual sk_sp< SkImage > MakeSkiaTextureImage (sk_sp< SkImage > image, SnapshotPixelFormat pixel_format)=0
 
virtual std::shared_ptr< impeller::TextureMakeImpellerTextureImage (sk_sp< SkImage > image, 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 26 of file mocks.h.

Constructor & Destructor Documentation

◆ MockSnapshotDelegate()

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

Definition at line 28 of file mocks.h.

29 : weak_factory_(this),
30 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 86 of file mocks.h.

86 {
87 return texture_registry_;
88 }

◆ GetWeakPtr()

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

Definition at line 82 of file mocks.h.

82 {
83 return weak_factory_.GetWeakPtr();
84 }

◆ MOCK_METHOD() [1/12]

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

◆ MOCK_METHOD() [2/12]

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

◆ MOCK_METHOD() [3/12]

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

◆ MOCK_METHOD() [4/12]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( sk_sp< SkImage >  ,
MakeSkiaSnapshotSync  ,
(sk_sp< DisplayList >, DlISize, SnapshotPixelFormat ,
(override)   
)

◆ MOCK_METHOD() [5/12]

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

◆ MOCK_METHOD() [6/12]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( std::shared_ptr< impeller::Texture ,
MakeImpellerSnapshotSync  ,
(sk_sp< DisplayList >, DlISize, SnapshotPixelFormat ,
(override)   
)

◆ MOCK_METHOD() [7/12]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( std::shared_ptr< impeller::Texture ,
MakeImpellerTextureImage  ,
(sk_sp< SkImage >, SnapshotPixelFormat ,
(override)   
)

◆ MOCK_METHOD() [8/12]

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

◆ MOCK_METHOD() [9/12]

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

◆ MOCK_METHOD() [10/12]

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

◆ MOCK_METHOD() [11/12]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( void  ,
MakeImpellerSnapshot  ,
(sk_sp< DisplayList >, DlISize, std::function< void(std::shared_ptr< impeller::Texture >)>, SnapshotPixelFormat target_format)  ,
(override)   
)

◆ MOCK_METHOD() [12/12]

flutter::testing::MockSnapshotDelegate::MOCK_METHOD ( void  ,
MakeSkiaSnapshot  ,
(sk_sp< DisplayList >, DlISize, std::function< void(sk_sp< SkImage >)>, SnapshotPixelFormat target_format)  ,
(override)   
)

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