mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Feat] (Diligent, EGL): release swap chain on EGL surface release
This commit is contained in:
@@ -841,6 +841,13 @@ namespace MobileGL::MG_Backend::DiligentBackend {
|
|||||||
BackendObject::ReleaseEGLResources();
|
BackendObject::ReleaseEGLResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BackendObject_Diligent::OnEGLSurfaceReleased(EGLSurface surface) {
|
||||||
|
(void)surface;
|
||||||
|
if (m_pRenderer != nullptr) {
|
||||||
|
m_pRenderer->ReleaseSwapChain();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Bool BackendObject_Diligent::ResizeEGLWindowSurface(EGLSurface surface, Uint32 width, Uint32 height) {
|
Bool BackendObject_Diligent::ResizeEGLWindowSurface(EGLSurface surface, Uint32 width, Uint32 height) {
|
||||||
const std::lock_guard<std::recursive_mutex> lock(m_eglStateMutex);
|
const std::lock_guard<std::recursive_mutex> lock(m_eglStateMutex);
|
||||||
if (!BackendObject::ResizeEGLWindowSurface(surface, width, height)) {
|
if (!BackendObject::ResizeEGLWindowSurface(surface, width, height)) {
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ namespace MobileGL::MG_Backend::DiligentBackend {
|
|||||||
Bool InitWindowSurface() override;
|
Bool InitWindowSurface() override;
|
||||||
Bool InitPbufferSurface(EGLint width, EGLint height) override;
|
Bool InitPbufferSurface(EGLint width, EGLint height) override;
|
||||||
Bool ResizeEGLWindowSurface(EGLSurface surface, Uint32 width, Uint32 height) override;
|
Bool ResizeEGLWindowSurface(EGLSurface surface, Uint32 width, Uint32 height) override;
|
||||||
|
void OnEGLSurfaceReleased(EGLSurface surface) override;
|
||||||
|
|
||||||
const RendererInfo& GetRendererInfo() const override;
|
const RendererInfo& GetRendererInfo() const override;
|
||||||
String GetBackendAPIVersionString() const override;
|
String GetBackendAPIVersionString() const override;
|
||||||
|
|||||||
Reference in New Issue
Block a user