DALI_ASSERT_ALWAYS( !mEGL && "Egl already initialized" );
// create the render thread, initially we are rendering
- mThread = new boost::thread(boost::bind(&RenderThread::Run, this));
+ mThread = new pthread_t();
+ int error = pthread_create( mThread, NULL, InternalThreadEntryFunc, this );
+ DALI_ASSERT_ALWAYS( !error && "Return code from pthread_create() in RenderThread" );
mSurface->StartRender();
}
mSurface->StopRender();
// wait for the thread to finish
- mThread->join();
+ pthread_join(*mThread, NULL);
delete mThread;
mThread = NULL;
*/
// EXTERNAL INCLUDES
-#include <boost/thread.hpp>
+#include <pthread.h>
// INTERNAL INCLUDES
#include <egl-interface.h>
*/
void PostRender( unsigned int timeDelta );
+ /**
+ * Helper for the thread calling the entry function.
+ * @param[in] This A pointer to the current RenderThread object
+ */
+ static inline void* InternalThreadEntryFunc( void* This )
+ {
+ ( static_cast<RenderThread*>( This ) )->Run();
+ return NULL;
+ }
+
private: // Data
UpdateRenderSynchronization& mUpdateRenderSync; ///< Used to synchronize the update & render threads
Integration::GlAbstraction& mGLES; ///< GL abstraction reference
EglFactoryInterface* mEglFactory; ///< Factory class to create EGL implementation
EglInterface* mEGL; ///< Interface to EGL implementation
- boost::thread* mThread; ///< render thread
+ pthread_t* mThread; ///< render thread
RenderSurface* mSurface; ///< Current surface
Dali::DisplayConnection* mDisplayConnection; ///< Display connection
const EnvironmentOptions& mEnvironmentOptions; ///< Environment options
#include "update-thread.h"
// EXTERNAL INCLUDES
-#include <boost/thread.hpp>
#include <cstdio>
// INTERNAL INCLUDES
if ( !mThread )
{
// Create and run the update-thread
- mThread = new boost::thread( boost::bind( &UpdateThread::Run, this ) );
+ mThread = new pthread_t();
+ int error = pthread_create( mThread, NULL, InternalThreadEntryFunc, this );
+ DALI_ASSERT_ALWAYS( !error && "Return code from pthread_create() in UpdateThread" );
}
}
if( mThread )
{
// wait for the thread to finish
- mThread->join();
+ pthread_join(*mThread, NULL);
delete mThread;
mThread = NULL;
*
*/
-namespace boost
-{
-class thread;
-} // namespace boost
+// EXTERNAL INCLUDES
+#include <pthread.h>
namespace Dali
{
*/
void UpdateStatusLogging( unsigned int keepUpdatingStatus, bool renderNeedsUpdate );
+ /**
+ * Helper for the thread calling the entry function
+ * @param[in] This A pointer to the current UpdateThread object
+ */
+ static inline void* InternalThreadEntryFunc( void* This )
+ {
+ ( static_cast<UpdateThread*>( This ) )->Run();
+ return NULL;
+ }
+
private: // Data
UpdateRenderSynchronization& mUpdateRenderSync; ///< Used to synchronize the update & render threads
unsigned int mStatusLogInterval; ///< Interval in frames between status debug prints
unsigned int mStatusLogCount; ///< Used to count frames between status debug prints
- boost::thread* mThread; ///< The actual update-thread.
+ pthread_t* mThread; ///< The actual update-thread.
const EnvironmentOptions& mEnvironmentOptions; ///< environment options
}; // class UpdateThread
// CLASS HEADER
#include "vsync-notifier.h"
-// EXTERNAL INCLUDES
-#include <boost/thread.hpp>
-
#include <dali/integration-api/core.h>
#include <dali/integration-api/platform-abstraction.h>
{
mVSyncMonitor->Initialize();
- mThread = new boost::thread( boost::bind( &VSyncNotifier::Run, this ) );
+ mThread = new pthread_t();
+ int error = pthread_create( mThread, NULL, InternalThreadEntryFunc, this );
+ DALI_ASSERT_ALWAYS( !error && "Return code from pthread_create() in VSyncNotifier" );
}
}
if( mThread )
{
// wait for the thread to finish
- mThread->join();
+ pthread_join(*mThread, NULL);
delete mThread;
mThread = NULL;
*
*/
-namespace boost
-{
-
-class thread;
-
-} // namespace boost
+// EXTERNAL INCLUDES
+#include <pthread.h>
namespace Dali
{
*/
void Run();
+ /**
+ * Helper for the thread calling the entry function
+ * @param[in] This A pointer to the current VSyncNotifier object
+ */
+ static inline void* InternalThreadEntryFunc( void* This )
+ {
+ ( static_cast<VSyncNotifier*>( This ) )->Run();
+ return NULL;
+ }
+
private:
UpdateRenderSynchronization& mUpdateRenderSync; ///< Used to synchronize the update, render & vsync threads
Dali::Integration::Core& mCore; ///< Dali core reference
Integration::PlatformAbstraction& mPlatformAbstraction; ///< The platform abstraction for retrieving the current time etc.
VSyncMonitorInterface* mVSyncMonitor; ///< VSyncMonitor interface
- boost::thread* mThread; ///< The actual thread.
+ pthread_t* mThread; ///< The actual thread.
const EnvironmentOptions& mEnvironmentOptions; ///< Environment options
unsigned int mNumberOfVSyncsPerRender;///< How many frames for each update/render cycle.