Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::OffscreenSurface Class Reference

#include <offscreen_surface.h>

Public Member Functions

 OffscreenSurface (GrDirectContext *surface_context, const SkISize &size)
 
 ~OffscreenSurface ()=default
 
sk_sp< SkDataGetRasterData (bool compressed) const
 
DlCanvasGetCanvas ()
 
bool IsValid () const
 

Detailed Description

Definition at line 24 of file offscreen_surface.h.

Constructor & Destructor Documentation

◆ OffscreenSurface()

flutter::OffscreenSurface::OffscreenSurface ( GrDirectContext surface_context,
const SkISize size 
)
explicit

Definition at line 71 of file offscreen_surface.cc.

72 {
73 offscreen_surface_ = CreateSnapshotSurface(surface_context, size);
74 if (offscreen_surface_) {
75 adapter_.set_canvas(offscreen_surface_->getCanvas());
76 }
77}
SkCanvas * getCanvas()
Definition: SkSurface.cpp:82
void set_canvas(SkCanvas *canvas)
Definition: dl_sk_canvas.cc:39
static sk_sp< SkSurface > CreateSnapshotSurface(GrDirectContext *surface_context, const SkISize &size)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

◆ ~OffscreenSurface()

flutter::OffscreenSurface::~OffscreenSurface ( )
default

Member Function Documentation

◆ GetCanvas()

DlCanvas * flutter::OffscreenSurface::GetCanvas ( )

Definition at line 83 of file offscreen_surface.cc.

83 {
84 return &adapter_;
85}

◆ GetRasterData()

sk_sp< SkData > flutter::OffscreenSurface::GetRasterData ( bool  compressed) const

Definition at line 79 of file offscreen_surface.cc.

79 {
80 return flutter::GetRasterData(offscreen_surface_, compressed);
81}
static sk_sp< SkData > GetRasterData(const sk_sp< SkSurface > &offscreen_surface, bool compressed)

◆ IsValid()

bool flutter::OffscreenSurface::IsValid ( ) const

Definition at line 87 of file offscreen_surface.cc.

87 {
88 return offscreen_surface_ != nullptr;
89}

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