#include <context.h>
Definition at line 20 of file context.h.
◆ Context()
| flutter::egl::Context::Context |
( |
EGLDisplay |
display, |
|
|
EGLContext |
context |
|
) |
| |
Definition at line 12 of file context.cc.
13 : display_(display), context_(context) {}
◆ ~Context()
| flutter::egl::Context::~Context |
( |
| ) |
|
Definition at line 15 of file context.cc.
15 {
16 if (display_ == EGL_NO_DISPLAY && context_ == EGL_NO_CONTEXT) {
17 return;
18 }
19
20 if (::eglDestroyContext(display_, context_) != EGL_TRUE) {
22 }
23}
References WINDOWS_LOG_EGL_ERROR.
◆ ClearCurrent()
| bool flutter::egl::Context::ClearCurrent |
( |
| ) |
const |
|
virtual |
Definition at line 40 of file context.cc.
40 {
41 const auto result = ::eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE,
42 EGL_NO_CONTEXT);
43 if (result != EGL_TRUE) {
45 return false;
46 }
47
48 return true;
49}
References WINDOWS_LOG_EGL_ERROR.
◆ GetHandle()
| const EGLContext & flutter::egl::Context::GetHandle |
( |
| ) |
const |
|
virtual |
Definition at line 51 of file context.cc.
51 {
52 return context_;
53}
◆ IsCurrent()
| bool flutter::egl::Context::IsCurrent |
( |
| ) |
const |
|
virtual |
Definition at line 25 of file context.cc.
25 {
26 return ::eglGetCurrentContext() == context_;
27}
◆ MakeCurrent()
| bool flutter::egl::Context::MakeCurrent |
( |
| ) |
const |
|
virtual |
Definition at line 29 of file context.cc.
29 {
30 const auto result =
31 ::eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, context_);
32 if (result != EGL_TRUE) {
34 return false;
35 }
36
37 return true;
38}
References WINDOWS_LOG_EGL_ERROR.
The documentation for this class was generated from the following files: