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

#include <gpu_surface_gl_impeller.h>

Inheritance diagram for flutter::GPUSurfaceGLImpeller:
flutter::Surface

Public Member Functions

 GPUSurfaceGLImpeller (GPUSurfaceGLDelegate *delegate, std::shared_ptr< impeller::Context > context, bool render_to_surface)
 
 ~GPUSurfaceGLImpeller () override
 
bool IsValid () override
 
- Public Member Functions inherited from flutter::Surface
 Surface ()
 
virtual ~Surface ()
 
virtual bool IsValid ()=0
 
virtual std::unique_ptr< SurfaceFrameAcquireFrame (const SkISize &size)=0
 
virtual SkMatrix GetRootTransformation () const =0
 
virtual GrDirectContextGetContext ()=0
 
virtual std::unique_ptr< GLContextResultMakeRenderContextCurrent ()
 
virtual bool ClearRenderContext ()
 
virtual bool AllowsDrawingWhenGpuDisabled () const
 
virtual bool EnableRasterCache () const
 
virtual std::shared_ptr< impeller::AiksContextGetAiksContext () const
 
virtual SurfaceData GetSurfaceData () const
 

Detailed Description

Definition at line 19 of file gpu_surface_gl_impeller.h.

Constructor & Destructor Documentation

◆ GPUSurfaceGLImpeller()

flutter::GPUSurfaceGLImpeller::GPUSurfaceGLImpeller ( GPUSurfaceGLDelegate delegate,
std::shared_ptr< impeller::Context context,
bool  render_to_surface 
)
explicit

Definition at line 15 of file gpu_surface_gl_impeller.cc.

19 : weak_factory_(this) {
20 if (delegate == nullptr) {
21 return;
22 }
23
24 if (!context || !context->IsValid()) {
25 return;
26 }
27
28 auto renderer = std::make_shared<impeller::Renderer>(context);
29 if (!renderer->IsValid()) {
30 return;
31 }
32
33 auto aiks_context = std::make_shared<impeller::AiksContext>(
35
36 if (!aiks_context->IsValid()) {
37 return;
38 }
39
40 delegate_ = delegate;
41 impeller_context_ = std::move(context);
42 render_to_surface_ = render_to_surface;
43 impeller_renderer_ = std::move(renderer);
44 aiks_context_ = std::move(aiks_context);
45 is_valid_ = true;
46}
static std::shared_ptr< TypographerContext > Make()

◆ ~GPUSurfaceGLImpeller()

flutter::GPUSurfaceGLImpeller::~GPUSurfaceGLImpeller ( )
overridedefault

Member Function Documentation

◆ IsValid()

bool flutter::GPUSurfaceGLImpeller::IsValid ( )
overridevirtual

Implements flutter::Surface.

Definition at line 52 of file gpu_surface_gl_impeller.cc.

52 {
53 return is_valid_;
54}

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