namespace
{
thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer to allow Adaptor::Get
+
+const uint32_t MAX_IDLE_COUNT = 10;
} // unnamed namespace
Dali::Adaptor* Adaptor::New( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
{
// Only request a notification if the Adaptor is actually running
// and we haven't installed the idle notification
- if( ( ! mNotificationOnIdleInstalled ) && ( RUNNING == mState || READY == mState || forceProcess ) )
+ if( ( mNotificationOnIdleInstalled < MAX_IDLE_COUNT ) && ( RUNNING == mState || READY == mState || forceProcess ) )
{
- mNotificationOnIdleInstalled = AddIdleEnterer( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess );
+ mNotificationOnIdleInstalled += ( AddIdleEnterer( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess ) ) ? 1 : 0;
}
}
ProcessCoreEvents();
// the idle handle automatically un-installs itself
- mNotificationOnIdleInstalled = false;
+ mNotificationOnIdleInstalled--;
return false;
}
mWindows(),
mPlatformAbstraction( nullptr ),
mCallbackManager( nullptr ),
- mNotificationOnIdleInstalled( false ),
+ mNotificationOnIdleInstalled( 0 ),
mNotificationTrigger( nullptr ),
mDaliFeedbackPlugin(),
mFeedbackController( nullptr ),
TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction
CallbackManager* mCallbackManager; ///< Used to install callbacks
- bool mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event
+ uint32_t mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event
TriggerEventInterface* mNotificationTrigger; ///< Notification event trigger
FeedbackPluginProxy* mDaliFeedbackPlugin; ///< Used to access feedback support
FeedbackController* mFeedbackController; ///< Plays feedback effects for Dali-Toolkit UI Controls.