Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::EmbedderRenderTargetSkia Class Referencefinal

#include <embedder_render_target_skia.h>

Inheritance diagram for flutter::EmbedderRenderTargetSkia:
flutter::EmbedderRenderTarget

Public Member Functions

 EmbedderRenderTargetSkia (FlutterBackingStore backing_store, sk_sp< SkSurface > render_surface, fml::closure on_release)
 
 ~EmbedderRenderTargetSkia () override
 
sk_sp< SkSurfaceGetSkiaSurface () const override
 A render surface the rasterizer can use to draw into the backing store of this render target. More...
 
impeller::RenderTargetGetImpellerRenderTarget () const override
 An impeller render target the rasterizer can use to draw into the backing store. More...
 
std::shared_ptr< impeller::AiksContextGetAiksContext () const override
 Returns the AiksContext that should be used for rendering, if this render target is backed by Impeller. More...
 
SkISize GetRenderTargetSize () const override
 Returns the size of the render target. More...
 
- Public Member Functions inherited from flutter::EmbedderRenderTarget
virtual ~EmbedderRenderTarget ()
 Destroys this instance of the render target and invokes the callback for the embedder to release its resource associated with the particular backing store. More...
 
virtual sk_sp< SkSurfaceGetSkiaSurface () const =0
 A render surface the rasterizer can use to draw into the backing store of this render target. More...
 
virtual impeller::RenderTargetGetImpellerRenderTarget () const =0
 An impeller render target the rasterizer can use to draw into the backing store. More...
 
virtual std::shared_ptr< impeller::AiksContextGetAiksContext () const =0
 Returns the AiksContext that should be used for rendering, if this render target is backed by Impeller. More...
 
virtual SkISize GetRenderTargetSize () const =0
 Returns the size of the render target. More...
 
const FlutterBackingStoreGetBackingStore () const
 The embedder backing store descriptor. This is the descriptor that was given to the engine by the embedder. This descriptor may contain context the embedder can use to associate it resources with the compositor layers when they are given back to it in present callback. The engine does not use this in any way. More...
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::EmbedderRenderTarget
 EmbedderRenderTarget (FlutterBackingStore backing_store, fml::closure on_release)
 Creates a render target whose backing store is managed by the embedder. The way this render target is exposed to the engine is via an SkSurface and a callback that is invoked by this object in its destructor. More...
 

Detailed Description

Definition at line 12 of file embedder_render_target_skia.h.

Constructor & Destructor Documentation

◆ EmbedderRenderTargetSkia()

flutter::EmbedderRenderTargetSkia::EmbedderRenderTargetSkia ( FlutterBackingStore  backing_store,
sk_sp< SkSurface render_surface,
fml::closure  on_release 
)

Definition at line 11 of file embedder_render_target_skia.cc.

15 : EmbedderRenderTarget(backing_store, std::move(on_release)),
16 render_surface_(std::move(render_surface)) {
17 FML_DCHECK(render_surface_);
18}
EmbedderRenderTarget(FlutterBackingStore backing_store, fml::closure on_release)
Creates a render target whose backing store is managed by the embedder. The way this render target is...
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ ~EmbedderRenderTargetSkia()

flutter::EmbedderRenderTargetSkia::~EmbedderRenderTargetSkia ( )
overridedefault

Member Function Documentation

◆ GetAiksContext()

std::shared_ptr< impeller::AiksContext > flutter::EmbedderRenderTargetSkia::GetAiksContext ( ) const
overridevirtual

Returns the AiksContext that should be used for rendering, if this render target is backed by Impeller.

Returns
The Impeller Aiks context.

Implements flutter::EmbedderRenderTarget.

Definition at line 32 of file embedder_render_target_skia.cc.

32 {
33 return nullptr;
34}

◆ GetImpellerRenderTarget()

impeller::RenderTarget * flutter::EmbedderRenderTargetSkia::GetImpellerRenderTarget ( ) const
overridevirtual

An impeller render target the rasterizer can use to draw into the backing store.

Returns
The Impeller render target.

Implements flutter::EmbedderRenderTarget.

Definition at line 26 of file embedder_render_target_skia.cc.

27 {
28 return nullptr;
29}

◆ GetRenderTargetSize()

SkISize flutter::EmbedderRenderTargetSkia::GetRenderTargetSize ( ) const
overridevirtual

Returns the size of the render target.

Returns
The size of the render target.

Implements flutter::EmbedderRenderTarget.

Definition at line 36 of file embedder_render_target_skia.cc.

36 {
37 return SkISize::Make(render_surface_->width(), render_surface_->height());
38}
int width() const
Definition: SkSurface.h:178
int height() const
Definition: SkSurface.h:184
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20

◆ GetSkiaSurface()

sk_sp< SkSurface > flutter::EmbedderRenderTargetSkia::GetSkiaSurface ( ) const
overridevirtual

A render surface the rasterizer can use to draw into the backing store of this render target.

Returns
The render surface.

Implements flutter::EmbedderRenderTarget.

Definition at line 22 of file embedder_render_target_skia.cc.

22 {
23 return render_surface_;
24}

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