[3.0] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface 89/97689/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 02:05:39 +0000 (11:05 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 02:05:49 +0000 (11:05 +0900)
This reverts commit 49431448de387e087cd282658f98de7ebd5199d5.

Change-Id: I3d3385221ffd809680d0c323e36968826d7ef531

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