// INTERNAL INCLUDES
#include <base/thread-controller.h>
-#include <base/performance-logging/performance-interface-factory.h>
+# include <base/performance-logging/performance-interface-factory.h>
#include <base/lifecycle-observer.h>
#include <dali/devel-api/text-abstraction/font-client.h>
PositionSize size = mSurface->GetPositionSize();
mCore->SurfaceResized( size.width, size.height );
- // Start all the threads
- mThreadController->Start();
+ // Initialize the thread controller
+ mThreadController->Initialize();
mState = RUNNING;
// Only resume the adaptor if we are in the suspended state.
if( PAUSED == mState )
{
- // We put ResumeFrameTime first, as this was originally called at the start of mCore->Resume()
- // If there were events pending, mCore->Resume() will call
- // RenderController->RequestUpdate()
- // ThreadController->RequestUpdate()
- // ThreadSynchronization->RequestUpdate()
- // and we should have reset the frame timers before allowing Core->Update() to be called.
- //@todo Should we call ThreadController->Resume before mCore->Resume()?
-
- mThreadController->ResumeFrameTime();
- mCore->Resume();
- mThreadController->Resume();
-
mState = RUNNING;
// Reset the event handler when adaptor resumed
(*iter)->OnResume();
}
- ProcessCoreEvents(); // Ensure any outstanding messages are processed
+ // Resume core so it processes any requests as well
+ mCore->Resume();
+
+ // Do at end to ensure our first update/render after resumption includes the processed messages as well
+ mThreadController->Resume();
}
}
void Adaptor::NotifySceneCreated()
{
GetCore().SceneCreated();
+
+ // Start thread controller after the scene has been created
+ mThreadController->Start();
}
void Adaptor::NotifyLanguageChanged()
Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surface, EnvironmentOptions* environmentOptions)
: mResizedSignal(),
mLanguageChangedSignal(),
- mAdaptor(adaptor),
- mState(READY),
- mCore(NULL),
- mThreadController(NULL),
- mVSyncMonitor(NULL),
+ mAdaptor( adaptor ),
+ mState( READY ),
+ mCore( NULL ),
+ mThreadController( NULL ),
+ mVSyncMonitor( NULL ),
mGLES( NULL ),
+ mGlSync( NULL ),
mEglFactory( NULL ),
mNativeWindow( nativeWindow ),
mSurface( surface ),
mEventHandler( NULL ),
mCallbackManager( NULL ),
mNotificationOnIdleInstalled( false ),
- mNotificationTrigger(NULL),
- mGestureManager(NULL),
+ mNotificationTrigger( NULL ),
+ mGestureManager( NULL ),
+ mDaliFeedbackPlugin(),
+ mFeedbackController( NULL ),
+ mTtsPlayers(),
mObservers(),
mDragAndDropDetector(),
- mDeferredRotationObserver(NULL),
+ mDeferredRotationObserver( NULL ),
mEnvironmentOptions( environmentOptions ? environmentOptions : new EnvironmentOptions /* Create the options if not provided */),
- mPerformanceInterface(NULL),
- mObjectProfiler(NULL),
+ mPerformanceInterface( NULL ),
+ mKernelTracer(),
+ mSystemTracer(),
+ mTriggerEventFactory(),
+ mObjectProfiler( NULL ),
+ mSocketFactory(),
mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ )
{
DALI_ASSERT_ALWAYS( !IsAvailable() && "Cannot create more than one Adaptor per thread" );