From: Seoyeon Kim Date: Fri, 20 Jan 2017 03:48:50 +0000 (+0900) Subject: [Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface X-Git-Tag: accepted/tizen/ivi/20170120.082218~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F111249%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface This reverts commit 670698c96a90ba6f39edf4bdb5aa0c0791393336. Change-Id: Id049d3d83c572f3f04c00b67d248f7008536cf8d --- diff --git a/adaptors/tizen/native-render-surface-tizen.cpp b/adaptors/tizen/native-render-surface-tizen.cpp index 787507f..1bb2f16 100644 --- a/adaptors/tizen/native-render-surface-tizen.cpp +++ b/adaptors/tizen/native-render-surface-tizen.cpp @@ -169,11 +169,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 ) @@ -200,12 +195,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(); } @@ -257,7 +246,8 @@ void NativeRenderSurface::CreateNativeRenderable() void NativeRenderSurface::ReleaseLock() { - if( mImpl->mThreadSynchronization ) + ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition ); + if( mImpl->mConsumeSurface ) { mImpl->mThreadSynchronization->PostRenderComplete(); }