Revert "[Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native rende... 95/111195/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 20 Jan 2017 02:17:19 +0000 (11:17 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 20 Jan 2017 02:17:22 +0000 (11:17 +0900)
This reverts commit efb181048bc27d34c8337f230d09c0450b27a3d7.

Change-Id: Iaf39687d83ff466de4cc53bcf41e0c907239109d

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

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