Flutter Engine
flutter::IOSContextGL Class Referencefinal

#include <ios_context_gl.h>

Inheritance diagram for flutter::IOSContextGL:
flutter::IOSContext

Public Member Functions

 IOSContextGL ()
 
 ~IOSContextGL () override
 
std::unique_ptr< IOSRenderTargetGLCreateRenderTarget (fml::scoped_nsobject< CAEAGLLayer > layer)
 
- Public Member Functions inherited from flutter::IOSContext
virtual ~IOSContext ()
 Collects the context object. This must happen on the thread on which this object was created. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from flutter::IOSContext
static std::unique_ptr< IOSContextCreate (IOSRenderingAPI rendering_api)
 Create an iOS context object capable of creating the on-screen and off-screen GPU context for use by Skia. More...
 
- Protected Member Functions inherited from flutter::IOSContext
 IOSContext ()
 

Detailed Description

Definition at line 19 of file ios_context_gl.h.

Constructor & Destructor Documentation

◆ IOSContextGL()

flutter::IOSContextGL::IOSContextGL ( )

Definition at line 15 of file ios_context_gl.mm.

References fml::scoped_nsprotocol< NST >::get(), fml::scoped_nsprotocol< NST >::reset(), and ~IOSContextGL().

15  {
16  resource_context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]);
17  if (resource_context_ != nullptr) {
18  context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3
19  sharegroup:resource_context_.get().sharegroup]);
20  } else {
21  resource_context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]);
22  context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2
23  sharegroup:resource_context_.get().sharegroup]);
24  }
25 }
void reset(NST object=nil)

◆ ~IOSContextGL()

flutter::IOSContextGL::~IOSContextGL ( )
overridedefault

Referenced by IOSContextGL().

Member Function Documentation

◆ CreateRenderTarget()

std::unique_ptr< IOSRenderTargetGL > flutter::IOSContextGL::CreateRenderTarget ( fml::scoped_nsobject< CAEAGLLayer >  layer)

Definition at line 29 of file ios_context_gl.mm.

References flutter::ShellIOManager::CreateCompatibleResourceLoadingContext(), FML_DLOG, fml::scoped_nsprotocol< NST >::get(), and flutter::GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface().

Referenced by flutter::IOSSurfaceGL::IOSSurfaceGL().

30  {
31  return std::make_unique<IOSRenderTargetGL>(std::move(layer), context_);
32 }

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