[Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface 42/108342/2
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 4 Jan 2017 06:14:43 +0000 (15:14 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 4 Jan 2017 07:14:18 +0000 (16:14 +0900)
Change-Id: Id6fefff4dcea21ef93e9d88821f759af434aad99

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 );