X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Ftizen%2Fnative-render-surface-tizen.cpp;h=7af6a74acc46b06360b953ceaa464fdd7e4f7510;hb=5b28891c5870b54f77f1df3be98686666a85dc23;hp=ab849e61a9527464249d58a57a3dbb9911647fe8;hpb=8ab9bcf35997ef86f7d817668b4bc7c3be44cf45;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/tizen/native-render-surface-tizen.cpp b/adaptors/tizen/native-render-surface-tizen.cpp index ab849e6..7af6a74 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(); }