From: Heeyong Song Date: Fri, 22 May 2020 07:23:43 +0000 (+0900) Subject: Delete multiple surfaces when the updated thread is destroyed X-Git-Tag: dali_1.5.14~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d019dfdc3cc881e188ae122600f41acb46de154;p=platform%2Fcore%2Fuifw%2Fdali-adaptor-legacy.git Delete multiple surfaces when the updated thread is destroyed Change-Id: I1d2f1431f1b4bb827691e28bfffba96c542eb227 --- 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