From 3a61945805d7fa9d2f8a6c1be5747d4ee1257593 Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Tue, 16 May 2017 16:30:38 +0900 Subject: [PATCH] Revert "[Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface" This reverts commit 80237931562f7178b5ffa9db4a1c8e11c5f9f399. Change-Id: If9d930a54aa7fbfcdf4541e47d17a7968313c1bc --- adaptors/tizen/native-render-surface-tizen.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/adaptors/tizen/native-render-surface-tizen.cpp b/adaptors/tizen/native-render-surface-tizen.cpp index 43678c7..e02822d 100644 --- a/adaptors/tizen/native-render-surface-tizen.cpp +++ b/adaptors/tizen/native-render-surface-tizen.cpp @@ -170,6 +170,11 @@ void NativeRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract Internal::Adaptor::EglImplementation& eglImpl = static_cast( egl ); eglImpl.SwapBuffers(); + if( mImpl->mThreadSynchronization ) + { + mImpl->mThreadSynchronization->PostRenderStarted(); + } + if( tbm_surface_queue_can_acquire( mImpl->mTbmQueue, 1 ) ) { if( tbm_surface_queue_acquire( mImpl->mTbmQueue, &mImpl->mConsumeSurface ) != TBM_SURFACE_QUEUE_ERROR_NONE ) @@ -196,6 +201,12 @@ void NativeRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstract mImpl->mRenderNotification->Trigger(); } + if( mImpl->mThreadSynchronization ) + { + // wait until the event-thread completed to use the tbm_surface + mImpl->mThreadSynchronization->PostRenderWaitForCompletion(); + } + // release the consumed surface after post render was completed ReleaseDrawable(); } @@ -247,8 +258,7 @@ void NativeRenderSurface::CreateNativeRenderable() void NativeRenderSurface::ReleaseLock() { - ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition ); - if( mImpl->mConsumeSurface ) + if( mImpl->mThreadSynchronization ) { mImpl->mThreadSynchronization->PostRenderComplete(); } -- 2.7.4