From 7d019dfdc3cc881e188ae122600f41acb46de154 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 22 May 2020 16:23:43 +0900 Subject: [PATCH] Delete multiple surfaces when the updated thread is destroyed Change-Id: I1d2f1431f1b4bb827691e28bfffba96c542eb227 --- .../adaptor/common/combined-update-render-controller.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 5c5840a..75d469c 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -796,11 +796,15 @@ void CombinedUpdateRenderController::UpdateRenderThread() // Inform core of context destruction mCore.ContextDestroyed(); - currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface(); - if( currentSurface ) + + WindowContainer windows; + mAdaptorInterfaces.GetWindowContainerInterface( windows ); + + // Destroy surfaces + for( auto&& window : windows ) { - currentSurface->DestroySurface(); - currentSurface = nullptr; + Dali::RenderSurfaceInterface* surface = window->GetSurface(); + surface->DestroySurface(); } // Shutdown EGL -- 2.7.4