Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( 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 )
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();
}
void NativeRenderSurface::ReleaseLock()
{
- if( mImpl->mThreadSynchronization )
+ ConditionalWait::ScopedLock lock( mImpl->mTbmSurfaceCondition );
+ if( mImpl->mConsumeSurface )
{
mImpl->mThreadSynchronization->PostRenderComplete();
}