From 26305f0c1b02ac8f0f23a1650caf535f6c3f528f Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Fri, 10 Jan 2020 18:39:00 +0900 Subject: [PATCH] [Tizen] Idler hotfix using small size counter Change-Id: Ice8b7eb793f821e0e0084eb0ed08751edc1dab08 Signed-off-by: Seungho, Baek --- dali/internal/adaptor/common/adaptor-impl.cpp | 10 ++++++---- dali/internal/adaptor/common/adaptor-impl.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 6049e0e..eaeeb2d 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -86,6 +86,8 @@ namespace Adaptor 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 ) @@ -914,9 +916,9 @@ void Adaptor::RequestProcessEventsOnIdle( bool forceProcess ) { // 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; } } @@ -1078,7 +1080,7 @@ bool Adaptor::ProcessCoreEventsFromIdle() ProcessCoreEvents(); // the idle handle automatically un-installs itself - mNotificationOnIdleInstalled = false; + mNotificationOnIdleInstalled--; return false; } @@ -1140,7 +1142,7 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, mWindows(), mPlatformAbstraction( nullptr ), mCallbackManager( nullptr ), - mNotificationOnIdleInstalled( false ), + mNotificationOnIdleInstalled( 0 ), mNotificationTrigger( nullptr ), mDaliFeedbackPlugin(), mFeedbackController( nullptr ), diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index c151865..d79e6f5 100755 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -660,7 +660,7 @@ private: // Data 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. -- 2.7.4