Revert "[Tizen] Idler hotfix using small size counter" 32/222232/1
authorDongsug Song <dongsug.song@samsung.com>
Sat, 11 Jan 2020 06:30:23 +0000 (15:30 +0900)
committerDongsug Song <dongsug.song@samsung.com>
Sat, 11 Jan 2020 07:33:52 +0000 (16:33 +0900)
- This error caused by the wrong access of worker thread in application.
- NUI's all contexts (object creation, property set/get, timer use, and etc) must be configured and accessed only on main thread.

This reverts commit 26305f0c1b02ac8f0f23a1650caf535f6c3f528f.

Change-Id: I548b0585be5f39c653daf2d61c7af6340d1a533d

dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h

index eaeeb2d..6049e0e 100755 (executable)
@@ -86,8 +86,6 @@ 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 )
@@ -916,9 +914,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 < MAX_IDLE_COUNT ) && ( RUNNING == mState || READY == mState || forceProcess ) )
+  if( ( ! mNotificationOnIdleInstalled ) && ( RUNNING == mState || READY == mState || forceProcess ) )
   {
-    mNotificationOnIdleInstalled += ( AddIdleEnterer( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess ) ) ? 1 : 0;
+    mNotificationOnIdleInstalled = AddIdleEnterer( MakeCallback( this, &Adaptor::ProcessCoreEventsFromIdle ), forceProcess );
   }
 }
 
@@ -1080,7 +1078,7 @@ bool Adaptor::ProcessCoreEventsFromIdle()
   ProcessCoreEvents();
 
   // the idle handle automatically un-installs itself
-  mNotificationOnIdleInstalled--;
+  mNotificationOnIdleInstalled = false;
 
   return false;
 }
@@ -1142,7 +1140,7 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor,
   mWindows(),
   mPlatformAbstraction( nullptr ),
   mCallbackManager( nullptr ),
-  mNotificationOnIdleInstalled( 0 ),
+  mNotificationOnIdleInstalled( false ),
   mNotificationTrigger( nullptr ),
   mDaliFeedbackPlugin(),
   mFeedbackController( nullptr ),
index d79e6f5..c151865 100755 (executable)
@@ -660,7 +660,7 @@ private: // Data
   TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction;      ///< Platform abstraction
 
   CallbackManager*                      mCallbackManager;             ///< Used to install callbacks
-  uint32_t                              mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event
+  bool                                  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.