[Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface 75/104475/3
authorsuhyung Eom <suhyung.eom@samsung.com>
Tue, 13 Dec 2016 10:28:03 +0000 (19:28 +0900)
committersu hyung Eom <suhyung.eom@samsung.com>
Tue, 13 Dec 2016 11:07:55 +0000 (03:07 -0800)
Change-Id: Ifee40fda978b5308b739610290bbdba8d1c98cbd

adaptors/tizen/native-render-surface-tizen.cpp

index c202bcc..3799b0e 100644 (file)
@@ -186,11 +186,6 @@ void NativeRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract
   Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
   eglImpl.SwapBuffers();
 
-  if( mImpl->mThreadSynchronization )
-  {
-    mImpl->mThreadSynchronization->PostRenderStarted();
-  }
-
   {
     ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition );
 
@@ -208,14 +203,9 @@ void NativeRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract
   if( mImpl->mRenderNotification )
   {
     // use notification trigger
-    // Tell the event-thread to render the pixmap
+    // Tell the event-thread to render the tbm_surface
     mImpl->mRenderNotification->Trigger();
   }
-
-  if( mImpl->mThreadSynchronization )
-  {
-    mImpl->mThreadSynchronization->PostRenderWaitForCompletion();
-  }
 }
 
 void NativeRenderSurface::StopRender()
@@ -265,6 +255,7 @@ void NativeRenderSurface::CreateNativeRenderable()
 
 void NativeRenderSurface::ReleaseSurface()
 {
+  ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition );
   if( mImpl->mConsumeSurface )
   {
     tbm_surface_queue_release( mImpl->mTbmQueue, mImpl->mConsumeSurface );