Delete multiple surfaces when the updated thread is destroyed 50/234150/2
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 22 May 2020 07:23:43 +0000 (16:23 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 27 May 2020 02:15:38 +0000 (02:15 +0000)
Change-Id: I1d2f1431f1b4bb827691e28bfffba96c542eb227

dali/internal/adaptor/common/combined-update-render-controller.cpp

index 5c5840a..75d469c 100644 (file)
@@ -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