Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
flutter::SnapshotController Class Referenceabstract

#include <snapshot_controller.h>

Inheritance diagram for flutter::SnapshotController:
flutter::SnapshotControllerImpeller flutter::SnapshotControllerSkia

Classes

class  Delegate
 

Public Member Functions

virtual ~SnapshotController ()=default
 
virtual void MakeRasterSnapshot (sk_sp< DisplayList > display_list, SkISize picture_size, std::function< void(const sk_sp< DlImage > &)> callback)=0
 
virtual sk_sp< DlImageMakeRasterSnapshotSync (sk_sp< DisplayList > display_list, SkISize picture_size)=0
 
virtual sk_sp< SkImageConvertToRasterImage (sk_sp< SkImage > image)=0
 
virtual void CacheRuntimeStage (const std::shared_ptr< impeller::RuntimeStage > &runtime_stage)=0
 

Static Public Member Functions

static std::unique_ptr< SnapshotControllerMake (const Delegate &delegate, const Settings &settings)
 

Protected Member Functions

 SnapshotController (const Delegate &delegate)
 
const DelegateGetDelegate ()
 

Detailed Description

Definition at line 21 of file snapshot_controller.h.

Constructor & Destructor Documentation

◆ ~SnapshotController()

virtual flutter::SnapshotController::~SnapshotController ( )
virtualdefault

◆ SnapshotController()

flutter::SnapshotController::SnapshotController ( const Delegate delegate)
explicitprotected

Definition at line 32 of file snapshot_controller.cc.

33 : delegate_(delegate) {}

Member Function Documentation

◆ CacheRuntimeStage()

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

◆ ConvertToRasterImage()

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

◆ GetDelegate()

const Delegate & flutter::SnapshotController::GetDelegate ( )
inlineprotected

Definition at line 57 of file snapshot_controller.h.

57{ return delegate_; }

◆ Make()

std::unique_ptr< SnapshotController > flutter::SnapshotController::Make ( const Delegate delegate,
const Settings settings 
)
static

Definition at line 15 of file snapshot_controller.cc.

17 {
18#if IMPELLER_SUPPORTS_RENDERING
19 if (settings.enable_impeller) {
20 return std::make_unique<SnapshotControllerImpeller>(delegate);
21 }
22#endif // IMPELLER_SUPPORTS_RENDERING
23#if !SLIMPELLER
24 return std::make_unique<SnapshotControllerSkia>(delegate);
25#else // !SLIMPELLER
27 << "Cannot create a Skia snapshot controller in an Impeller build.";
28 return nullptr;
29#endif // !SLIMPELLER
30}
#define FATAL(error)
#define FML_LOG(severity)
Definition: logging.h:82

◆ MakeRasterSnapshot()

virtual void flutter::SnapshotController::MakeRasterSnapshot ( sk_sp< DisplayList display_list,
SkISize  picture_size,
std::function< void(const sk_sp< DlImage > &)>  callback 
)
pure virtual

◆ MakeRasterSnapshotSync()

virtual sk_sp< DlImage > flutter::SnapshotController::MakeRasterSnapshotSync ( sk_sp< DisplayList display_list,
SkISize  picture_size 
)
pure virtual

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