Flutter Engine
flutter::Surface Class Referenceabstract

Abstract Base Class that represents where we will be rendering content. More...

#include <surface.h>

Inheritance diagram for flutter::Surface:
flutter::GPUSurfaceGL flutter::GPUSurfaceMetal flutter::GPUSurfaceSoftware flutter::GPUSurfaceVulkan flutter::testing::SurfaceMock flutter_runner::Surface

Public Member Functions

 Surface ()
 
virtual ~Surface ()
 
virtual bool IsValid ()=0
 
virtual std::unique_ptr< SurfaceFrameAcquireFrame (const SkISize &size)=0
 
virtual SkMatrix GetRootTransformation () const =0
 
virtual GrDirectContext * GetContext ()=0
 
virtual std::unique_ptr< GLContextResultMakeRenderContextCurrent ()
 
virtual bool ClearRenderContext ()
 
virtual bool AllowsDrawingWhenGpuDisabled () const
 

Detailed Description

Abstract Base Class that represents where we will be rendering content.

Definition at line 18 of file surface.h.

Constructor & Destructor Documentation

◆ Surface()

flutter::Surface::Surface ( )
default

◆ ~Surface()

flutter::Surface::~Surface ( )
virtualdefault

Reimplemented in flutter_runner::Surface.

Member Function Documentation

◆ AcquireFrame()

virtual std::unique_ptr<SurfaceFrame> flutter::Surface::AcquireFrame ( const SkISize &  size)
pure virtual

◆ AllowsDrawingWhenGpuDisabled()

bool flutter::Surface::AllowsDrawingWhenGpuDisabled ( ) const
virtual

Reimplemented in flutter::GPUSurfaceGL.

Definition at line 21 of file surface.cc.

21  {
22  return true;
23 }

◆ ClearRenderContext()

bool flutter::Surface::ClearRenderContext ( )
virtual

Reimplemented in flutter::GPUSurfaceGL.

Definition at line 17 of file surface.cc.

17  {
18  return false;
19 }

◆ GetContext()

virtual GrDirectContext* flutter::Surface::GetContext ( )
pure virtual

◆ GetRootTransformation()

virtual SkMatrix flutter::Surface::GetRootTransformation ( ) const
pure virtual

◆ IsValid()

virtual bool flutter::Surface::IsValid ( )
pure virtual

◆ MakeRenderContextCurrent()

std::unique_ptr< GLContextResult > flutter::Surface::MakeRenderContextCurrent ( )
virtual

Reimplemented in flutter::GPUSurfaceGL.

Definition at line 13 of file surface.cc.

Referenced by flutter::Rasterizer::Draw().

13  {
14  return std::make_unique<GLContextDefaultResult>(true);
15 }

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