#include <context.h>
Public Types | |
| enum | LifecycleEvent { LifecycleEvent::kDidMakeCurrent, LifecycleEvent::kWillClearCurrent } |
| using | LifecycleListener = std::function< void(LifecycleEvent)> |
Public Member Functions | |
| Context (EGLDisplay display, EGLContext context) | |
| ~Context () | |
| bool | IsValid () const |
| const EGLContext & | GetHandle () const |
| bool | MakeCurrent (const Surface &surface) const |
| bool | ClearCurrent () const |
| std::optional< UniqueID > | AddLifecycleListener (const LifecycleListener &listener) |
| bool | RemoveLifecycleListener (UniqueID id) |
| using impeller::egl::Context::LifecycleListener = std::function<void(LifecycleEvent)> |
|
strong |
| impeller::egl::Context::Context | ( | EGLDisplay | display, |
| EGLContext | context | ||
| ) |
Definition at line 12 of file context.cc.
| impeller::egl::Context::~Context | ( | ) |
| std::optional< UniqueID > impeller::egl::Context::AddLifecycleListener | ( | const LifecycleListener & | listener | ) |
Definition at line 74 of file context.cc.
| bool impeller::egl::Context::ClearCurrent | ( | ) | const |
Definition at line 61 of file context.cc.
References impeller::egl::EGLMakeCurrentIfNecessary(), IMPELLER_LOG_EGL_ERROR, and kWillClearCurrent.
| const EGLContext & impeller::egl::Context::GetHandle | ( | ) | const |
Definition at line 27 of file context.cc.
Referenced by impeller::egl::Display::CreateContext().
| bool impeller::egl::Context::IsValid | ( | ) | const |
Definition at line 23 of file context.cc.
| bool impeller::egl::Context::MakeCurrent | ( | const Surface & | surface | ) | const |
Definition at line 45 of file context.cc.
References impeller::egl::EGLMakeCurrentIfNecessary(), impeller::egl::Surface::GetHandle(), IMPELLER_LOG_EGL_ERROR, and kDidMakeCurrent.
| bool impeller::egl::Context::RemoveLifecycleListener | ( | UniqueID | id | ) |
Definition at line 85 of file context.cc.