Flutter Engine
flutter::GPUSurfaceGLDelegate Class Referenceabstract

#include <gpu_surface_gl_delegate.h>

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

Public Types

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

Public Member Functions

 ~GPUSurfaceGLDelegate () override
 
ExternalViewEmbedderGetExternalViewEmbedder () override
 Gets the view embedder that controls how the Flutter layer hierarchy split into multiple chunks should be composited back on-screen. This field is optional and the Flutter rasterizer will render into a single on-screen surface if this call returns a null external view embedder. This happens on the GPU thread. More...
 
virtual std::unique_ptr< GLContextResultGLContextMakeCurrent ()=0
 
virtual bool GLContextClearCurrent ()=0
 
virtual bool GLContextPresent (uint32_t fbo_id)=0
 
virtual intptr_t GLContextFBO (GLFrameInfo frame_info) const =0
 
virtual bool GLContextFBOResetAfterPresent () const
 
virtual bool SurfaceSupportsReadback () const
 
virtual SkMatrix GLContextSurfaceTransformation () const
 
virtual sk_sp< const GrGLInterface > GetGLInterface () const
 
virtual GLProcResolver GetGLProcResolver () const
 
- Public Member Functions inherited from flutter::GPUSurfaceDelegate
virtual ~GPUSurfaceDelegate ()
 

Static Public Member Functions

static sk_sp< const GrGLInterface > GetDefaultPlatformGLInterface ()
 

Detailed Description

Definition at line 24 of file gpu_surface_gl_delegate.h.

Member Typedef Documentation

◆ GLProcResolver

Definition at line 69 of file gpu_surface_gl_delegate.h.

Constructor & Destructor Documentation

◆ ~GPUSurfaceGLDelegate()

flutter::GPUSurfaceGLDelegate::~GPUSurfaceGLDelegate ( )
overridedefault

Member Function Documentation

◆ GetDefaultPlatformGLInterface()

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

Definition at line 98 of file gpu_surface_gl_delegate.cc.

References flutter::CreateGLInterface().

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

98  {
99  return CreateGLInterface(nullptr);
100 }
static sk_sp< const GrGLInterface > CreateGLInterface(GPUSurfaceGLDelegate::GLProcResolver proc_resolver)

◆ GetExternalViewEmbedder()

ExternalViewEmbedder * flutter::GPUSurfaceGLDelegate::GetExternalViewEmbedder ( )
overridevirtual

Gets the view embedder that controls how the Flutter layer hierarchy split into multiple chunks should be composited back on-screen. This field is optional and the Flutter rasterizer will render into a single on-screen surface if this call returns a null external view embedder. This happens on the GPU thread.

Returns
The external view embedder, or, null if Flutter is rendering into a single on-screen surface.

Implements flutter::GPUSurfaceDelegate.

Reimplemented in flutter::AndroidSurfaceGL, flutter::AndroidSurfaceMock, and flutter::IOSSurfaceGL.

Definition at line 102 of file gpu_surface_gl_delegate.cc.

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

102  {
103  return nullptr;
104 }

◆ GetGLInterface()

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

Reimplemented in flutter::AndroidSurfaceGL.

Definition at line 93 of file gpu_surface_gl_delegate.cc.

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

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

93  {
95 }
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 29 of file gpu_surface_gl_delegate.cc.

Referenced by GetGLInterface().

30  {
31  return nullptr;
32 }

◆ 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 }

◆ GLContextMakeCurrent()

◆ GLContextPresent()

virtual bool flutter::GPUSurfaceGLDelegate::GLContextPresent ( uint32_t  fbo_id)
pure virtual

◆ GLContextSurfaceTransformation()

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

Definition at line 23 of file gpu_surface_gl_delegate.cc.

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

23  {
24  SkMatrix matrix;
25  matrix.setIdentity();
26  return matrix;
27 }

◆ SurfaceSupportsReadback()

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

Reimplemented in flutter::IOSSurfaceGL.

Definition at line 19 of file gpu_surface_gl_delegate.cc.

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

19  {
20  return true;
21 }

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