Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 22 of file offscreen_surface.h.

Constructor & Destructor Documentation

◆ OffscreenSurface()

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

Definition at line 69 of file offscreen_surface.cc.

70 {
71 offscreen_surface_ = CreateSnapshotSurface(surface_context, size);
72 if (offscreen_surface_) {
73 adapter_.set_canvas(offscreen_surface_->getCanvas());
74 }
75}
SkCanvas * getCanvas()
Definition SkSurface.cpp:82
void set_canvas(SkCanvas *canvas)
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 81 of file offscreen_surface.cc.

81 {
82 return &adapter_;
83}

◆ GetRasterData()

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

Definition at line 77 of file offscreen_surface.cc.

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

◆ IsValid()

bool flutter::OffscreenSurface::IsValid ( ) const

Definition at line 85 of file offscreen_surface.cc.

85 {
86 return offscreen_surface_ != nullptr;
87}

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