[Fix] (MG_State/EGLState, MG_Backend): defer current EGL surface destruction

This commit is contained in:
2026-07-03 10:14:26 +08:00
parent ce2b5a793f
commit 6418561d3c
9 changed files with 114 additions and 52 deletions
@@ -756,9 +756,6 @@ namespace MobileGL::MG_Backend::DirectGLES {
void BackendObject_DirectGLES::ReleaseEGLSurface(EGLSurface surface) {
const std::lock_guard<std::recursive_mutex> lock(m_eglStateMutex);
if (m_eglSurface == surface) {
DestroyEGLContext();
}
BackendObject::ReleaseEGLSurface(surface);
}
@@ -768,6 +765,11 @@ namespace MobileGL::MG_Backend::DirectGLES {
BackendObject::ReleaseEGLResources();
}
void BackendObject_DirectGLES::OnEGLSurfaceReleased(EGLSurface surface) {
(void)surface;
DestroyEGLContext();
}
const RendererInfo& BackendObject_DirectGLES::GetRendererInfo() const {
static RendererInfo RendererInfo = {
.RendererName = "Espryt", // Renderer Name