From 2f003fc3095a830395d81a18de8cf8fb21560aa5 Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Mon, 10 Apr 2017 11:07:32 +0900 Subject: [PATCH] [Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface This reverts commit 0ee044ce9dd970b4115a20c9a5e86574559f8ad6. Change-Id: Ic24927612f5186d0f2499689518619b1465518a2 --- adaptors/tizen/native-render-surface-tizen.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/adaptors/tizen/native-render-surface-tizen.cpp b/adaptors/tizen/native-render-surface-tizen.cpp index e02822d..43678c7 100644 --- a/adaptors/tizen/native-render-surface-tizen.cpp +++ b/adaptors/tizen/native-render-surface-tizen.cpp @@ -170,11 +170,6 @@ 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 ) @@ -201,12 +196,6 @@ 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(); } @@ -258,7 +247,8 @@ void NativeRenderSurface::CreateNativeRenderable() void NativeRenderSurface::ReleaseLock() { - if( mImpl->mThreadSynchronization ) + ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition ); + if( mImpl->mConsumeSurface ) { mImpl->mThreadSynchronization->PostRenderComplete(); } -- 2.7.4