* If sync mode is WAIT, then acquire a lock. This prevents render thread from
* continuing until the pixmap has been drawn by the compositor.
* It must be released for rendering to continue.
- * @param[in] syncMode The current sync mode
*/
- void AcquireLock( SyncMode syncMode );
+ void AcquireLock();
/**
* Release any locks.
* If sync mode is WAIT, then acquire a lock. This prevents render thread from
* continuing until the pixmap has been drawn by the compositor.
* It must be released for rendering to continue.
- * @param[in] syncMode The current sync mode
*/
- void AcquireLock( SyncMode syncMode );
+ void AcquireLock();
/**
* Release any locks.
// flush gl instruction queue
glAbstraction.Flush();
+ mImpl->mSyncReceived = false;
+
// create damage for client applications which wish to know the update timing
if( mRenderNotification )
{
}
}
- AcquireLock( replacingSurface ? SYNC_MODE_NONE : SYNC_MODE_WAIT );
+ if( !replacingSurface && mImpl->mSyncMode != SYNC_MODE_NONE )
+ {
+ AcquireLock();
+ }
}
void PixmapRenderSurface::StopRender()
mImpl->mSyncMode = syncMode;
}
-void PixmapRenderSurface::AcquireLock( SyncMode syncMode )
+void PixmapRenderSurface::AcquireLock()
{
- Dali::Mutex::ScopedLock lock( mImpl->mSyncMutex );
-
- // wait for sync
- if( syncMode != SYNC_MODE_NONE &&
- mImpl->mSyncMode != SYNC_MODE_NONE &&
- !mImpl->mSyncReceived )
+ if( !mImpl->mSyncReceived )
{
- mImpl->mSyncNotify.Wait( );
+ mImpl->mSyncNotify.Wait();
}
mImpl->mSyncReceived = false;
}
void PixmapRenderSurface::ReleaseLock()
{
- {
- Dali::Mutex::ScopedLock lock( mImpl->mSyncMutex );
- mImpl->mSyncReceived = true;
- }
+ mImpl->mSyncReceived = true;
// wake render thread if it was waiting for the notify
mImpl->mSyncNotify.Notify();