Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::GLContextSwitch Class Referencefinal

#include <gl_context_switch.h>

Inheritance diagram for flutter::GLContextSwitch:
flutter::GLContextResult

Public Member Functions

 GLContextSwitch (std::unique_ptr< SwitchableGLContext > context)
 
 ~GLContextSwitch () override
 
- Public Member Functions inherited from flutter::GLContextResult
 GLContextResult ()
 
virtual ~GLContextResult ()
 
bool GetResult ()
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::GLContextResult
 GLContextResult (bool static_result)
 
 FML_DISALLOW_COPY_AND_ASSIGN (GLContextResult)
 
- Protected Attributes inherited from flutter::GLContextResult
bool result_
 

Detailed Description

Switches the gl context to the a context that is passed in the constructor.

In destruction, it should restore the current context to what was before the construction of this switch.

Definition at line 94 of file gl_context_switch.h.

Constructor & Destructor Documentation

◆ GLContextSwitch()

flutter::GLContextSwitch::GLContextSwitch ( std::unique_ptr< SwitchableGLContext context)
explicit

Constructs a |GLContextSwitch|.

Parameters
contextThe context that is going to be set as the current context. The |GLContextSwitch| should not outlive the owner of the gl context wrapped inside the context.

Definition at line 28 of file gl_context_switch.cc.

29 : context_(std::move(context)) {
30 FML_CHECK(context_ != nullptr);
31 result_ = context_->SetCurrent();
32};
#define FML_CHECK(condition)
Definition logging.h:85

◆ ~GLContextSwitch()

flutter::GLContextSwitch::~GLContextSwitch ( )
override

Definition at line 34 of file gl_context_switch.cc.

34 {
35 context_->RemoveCurrent();
36};

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