Revert "[3.0] Fix rendering issue by tbm_surface and eglSwapBuffers in native render... 66/104466/1
authorsuhyung Eom <suhyung.eom@samsung.com>
Tue, 13 Dec 2016 10:19:45 +0000 (19:19 +0900)
committersuhyung Eom <suhyung.eom@samsung.com>
Tue, 13 Dec 2016 10:20:00 +0000 (19:20 +0900)
This reverts commit 8835b8f521facfd691ef5463972b3cde73f638af.
Change-Id: I47caed4e281fec9a98048385148b53bf24002552

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

index 3799b0e00a1bd0fe139f7a25c70f0215ed27658c..c202bccd282698a7ac45670ca7b8ed3ef7d4ce57 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 );