From: Seoyeon Kim Date: Tue, 2 May 2017 01:42:01 +0000 (+0900) Subject: [Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface X-Git-Tag: accepted/tizen/unified/20170502.165638~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7555abd8d07e90f5f16d8dd4b10687e04a845a77;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface This reverts commit e165daa2c7a567b1e423af51da84548ef533a17b. Change-Id: I6a0cd52924f4e0f6a1d898e27dc7ebec0e84ccbf --- 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(); }