[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
@@ -463,9 +463,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
void BackendObject_DirectVulkan::ReleaseEGLSurface(EGLSurface surface) {
const std::lock_guard<std::recursive_mutex> lock(m_eglStateMutex);
if (m_eglSurface == surface) {
pVulkanRenderer.reset();
}
BackendObject::ReleaseEGLSurface(surface);
}
@@ -475,6 +472,11 @@ namespace MobileGL::MG_Backend::DirectVulkan {
BackendObject::ReleaseEGLResources();
}
void BackendObject_DirectVulkan::OnEGLSurfaceReleased(EGLSurface surface) {
(void)surface;
pVulkanRenderer.reset();
}
const RendererInfo& BackendObject_DirectVulkan::GetRendererInfo() const {
return m_rendererInfo;
}