mUpdateStatusLogger( environmentOptions ),
mEventThreadSemaphore(),
mGraphicsInitializeSemaphore(),
+ mSurfaceSemaphore(),
mUpdateRenderThreadWaitCondition(),
mAdaptorInterfaces( adaptorInterfaces ),
mPerformanceInterface( adaptorInterfaces.GetPerformanceInterface() ),
// Initialize to 0 so that it just waits if sem_post has not been called
sem_init( &mEventThreadSemaphore, 0, 0 );
sem_init( &mGraphicsInitializeSemaphore, 0, 0 );
+ sem_init( &mSurfaceSemaphore, 0, 0 );
}
CombinedUpdateRenderController::~CombinedUpdateRenderController()
}
// Wait until the surface has been replaced
- sem_wait( &mEventThreadSemaphore );
+ sem_wait( &mSurfaceSemaphore );
LOG_EVENT( "Surface replaced, event-thread continuing" );
}
}
// Wait until the surface has been deleted
- sem_wait( &mEventThreadSemaphore );
+ sem_wait( &mSurfaceSemaphore );
LOG_EVENT( "Surface deleted, event-thread continuing" );
}
void CombinedUpdateRenderController::SurfaceReplaced()
{
// Just increment the semaphore
- sem_post( &mEventThreadSemaphore );
+ sem_post( &mSurfaceSemaphore );
}
Dali::RenderSurfaceInterface* CombinedUpdateRenderController::ShouldSurfaceBeDeleted()
void CombinedUpdateRenderController::SurfaceDeleted()
{
// Just increment the semaphore
- sem_post( &mEventThreadSemaphore );
+ sem_post( &mSurfaceSemaphore );
}
bool CombinedUpdateRenderController::ShouldSurfaceBeResized()
FpsTracker mFpsTracker; ///< Object that tracks the FPS
UpdateStatusLogger mUpdateStatusLogger; ///< Object that logs the update-status as required.
- sem_t mEventThreadSemaphore; ///< Used by the event thread to ensure all threads have been initialised, and when replacing the surface.
+ sem_t mEventThreadSemaphore; ///< Used by the event thread to ensure all threads have been initialised.
sem_t mGraphicsInitializeSemaphore; ///< Used by the render thread to ensure the graphics has been initialised.
+ sem_t mSurfaceSemaphore; ///< Used by the event thread to ensure the surface has been deleted or replaced.
ConditionalWait mUpdateRenderThreadWaitCondition; ///< The wait condition for the update-render-thread.