From: dongsug.song Date: Fri, 31 Mar 2017 04:01:28 +0000 (+0900) Subject: Revert "[Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native rende... X-Git-Tag: accepted/tizen/common/20170403.185707~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F122283%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Revert "[Tizen] Fix rendering issue by tbm_surface and eglSwapBuffers in native render surface" This reverts commit a8a3a3be8abd0e6446e863d340269afaba67794d. Change-Id: I4978d9eefb8411d8dcade49c9f32ce02fe9e1a3e --- 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(); }