Flutter Engine
flutter::GPUSurfaceGLDelegate Class Referenceabstract

#include <gpu_surface_gl_delegate.h>

Inheritance diagram for flutter::GPUSurfaceGLDelegate:
flutter::AndroidSurfaceGL flutter::AndroidSurfaceMock flutter::EmbedderSurfaceGL flutter::IOSSurfaceGL flutter::testing::ShellTestPlatformViewGL

Public Types

using GLProcResolver = std::function< void *(const char *)>
 

Public Member Functions

 ~GPUSurfaceGLDelegate ()
 
virtual std::unique_ptr< GLContextResultGLContextMakeCurrent ()=0
 
virtual bool GLContextClearCurrent ()=0
 
virtual bool GLContextPresent (fml::TimePoint target_time, uint32_t fbo_id)=0
 
virtual intptr_t GLContextFBO (GLFrameInfo frame_info) const =0
 
virtual bool GLContextFBOResetAfterPresent () const
 
virtual SurfaceFrame::FramebufferInfo GLContextFramebufferInfo () const
 
virtual SkMatrix GLContextSurfaceTransformation () const
 
virtual sk_sp< const GrGLInterface > GetGLInterface () const
 
virtual GLProcResolver GetGLProcResolver () const
 
virtual bool AllowsDrawingWhenGpuDisabled () const
 

Static Public Member Functions

static sk_sp< const GrGLInterface > GetDefaultPlatformGLInterface ()
 

Detailed Description

Definition at line 23 of file gpu_surface_gl_delegate.h.

Member Typedef Documentation

◆ GLProcResolver

Definition at line 65 of file gpu_surface_gl_delegate.h.

Constructor & Destructor Documentation

◆ ~GPUSurfaceGLDelegate()

flutter::GPUSurfaceGLDelegate::~GPUSurfaceGLDelegate ( )
default

Member Function Documentation

◆ AllowsDrawingWhenGpuDisabled()

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

Reimplemented in flutter::IOSSurfaceGL.

Definition at line 105 of file gpu_surface_gl_delegate.cc.

Referenced by flutter::GPUSurfaceGL::AllowsDrawingWhenGpuDisabled().

105  {
106  return true;
107 }

◆ GetDefaultPlatformGLInterface()

sk_sp< const GrGLInterface > flutter::GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface ( )
static

Definition at line 101 of file gpu_surface_gl_delegate.cc.

References flutter::CreateGLInterface().

Referenced by flutter::IOSContextGL::CreateResourceContext(), and flutter::PlatformViewAndroid::RegisterExternalTexture().

101  {
102  return CreateGLInterface(nullptr);
103 }
static sk_sp< const GrGLInterface > CreateGLInterface(GPUSurfaceGLDelegate::GLProcResolver proc_resolver)

◆ GetGLInterface()

sk_sp< const GrGLInterface > flutter::GPUSurfaceGLDelegate::GetGLInterface ( ) const
virtual

Reimplemented in flutter::AndroidSurfaceGL.

Definition at line 96 of file gpu_surface_gl_delegate.cc.

References flutter::CreateGLInterface(), and GetGLProcResolver().

Referenced by flutter::EmbedderSurfaceGL::EmbedderSurfaceGL(), flutter::AndroidSurfaceGL::GetGLInterface(), and flutter::GPUSurfaceGL::MakeGLContext().

96  {
98 }
static sk_sp< const GrGLInterface > CreateGLInterface(GPUSurfaceGLDelegate::GLProcResolver proc_resolver)
virtual GLProcResolver GetGLProcResolver() const

◆ GetGLProcResolver()

GPUSurfaceGLDelegate::GLProcResolver flutter::GPUSurfaceGLDelegate::GetGLProcResolver ( ) const
virtual

Definition at line 32 of file gpu_surface_gl_delegate.cc.

Referenced by GetGLInterface().

33  {
34  return nullptr;
35 }

◆ GLContextClearCurrent()

virtual bool flutter::GPUSurfaceGLDelegate::GLContextClearCurrent ( )
pure virtual

◆ GLContextFBO()

virtual intptr_t flutter::GPUSurfaceGLDelegate::GLContextFBO ( GLFrameInfo  frame_info) const
pure virtual

◆ GLContextFBOResetAfterPresent()

bool flutter::GPUSurfaceGLDelegate::GLContextFBOResetAfterPresent ( ) const
virtual

Definition at line 15 of file gpu_surface_gl_delegate.cc.

Referenced by flutter::GPUSurfaceGL::AcquireFrame().

15  {
16  return false;
17 }

◆ GLContextFramebufferInfo()

SurfaceFrame::FramebufferInfo flutter::GPUSurfaceGLDelegate::GLContextFramebufferInfo ( ) const
virtual

Reimplemented in flutter::IOSSurfaceGL.

Definition at line 19 of file gpu_surface_gl_delegate.cc.

References flutter::SurfaceFrame::FramebufferInfo::supports_readback.

Referenced by flutter::GPUSurfaceGL::AcquireFrame().

20  {
21  SurfaceFrame::FramebufferInfo res;
22  res.supports_readback = true;
23  return res;
24 }

◆ GLContextMakeCurrent()

◆ GLContextPresent()

virtual bool flutter::GPUSurfaceGLDelegate::GLContextPresent ( fml::TimePoint  target_time,
uint32_t  fbo_id 
)
pure virtual

◆ GLContextSurfaceTransformation()

SkMatrix flutter::GPUSurfaceGLDelegate::GLContextSurfaceTransformation ( ) const
virtual

Definition at line 26 of file gpu_surface_gl_delegate.cc.

Referenced by flutter::GPUSurfaceGL::GetRootTransformation().

26  {
27  SkMatrix matrix;
28  matrix.setIdentity();
29  return matrix;
30 }

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