(Offscreen) Temperal fix to Call DestroyContext() at DestroySurface() 28/316628/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Mon, 26 Aug 2024 02:25:59 +0000 (11:25 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Mon, 26 Aug 2024 02:25:59 +0000 (11:25 +0900)
Since it could be call DestroyContext when graphics are terminated,

Let we call DestroyContext at DestroySurface() API.

TODO : Let we call this API more clear way

Change-Id: I4e3195597d3d456df2281de21882bf7d446f9697
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp

index ff2168be739032e4b811bae81f166dc6ba8b90ff..c0615ea993b87704b5fbf52e0a96b3b64f699806 100644 (file)
@@ -237,6 +237,13 @@ void NativeRenderSurfaceEcoreWl::DestroySurface()
 
   DALI_LOG_RELEASE_INFO("NativeRenderSurfaceEcoreWl::DestroySurface mTbmQueue(%p), mOwnSurface(%d), surface: %p\n", mTbmQueue, mOwnSurface, mEGLSurface);
   eglImpl.DestroySurface(mEGLSurface);
+  mEGLSurface = NULL;
+
+  // TODO : We'd better call this API for more clear way.
+  if(mEGLContext != NULL)
+  {
+    DestroyContext();
+  }
 }
 
 void NativeRenderSurfaceEcoreWl::CreateContext()
@@ -259,6 +266,7 @@ void NativeRenderSurfaceEcoreWl::DestroyContext()
 
   DALI_LOG_RELEASE_INFO("NativeRenderSurfaceEcoreWl::DestroyContext mTbmQueue(%p), mOwnSurface(%d), destroy context: %p\n", mTbmQueue, mOwnSurface, mEGLContext);
   eglImpl.DestroyContext(mEGLContext);
+  mEGLContext = NULL;
 }
 
 bool NativeRenderSurfaceEcoreWl::ReplaceGraphicsSurface()