Fix the issue that indicator is not updated & ensure UpdateOnce works if we're asleep 55/47055/1
authorJonghyun Ho <jonghyun.ho@samsung.com>
Fri, 28 Aug 2015 11:38:59 +0000 (20:38 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 28 Aug 2015 15:05:48 +0000 (16:05 +0100)
[cause] 1. Shared memory is used instead of pixmap,
           but pixmap is being checked with OP_UPDATE event
        2. UpdateRequestOnce does not take effect
           while adaptor is not paused and thread is sleeping

Change-Id: I1407ab709ac98e7e2b7a2460a2d52b9593d37887

adaptors/base/thread-synchronization.cpp
adaptors/common/indicator-impl.cpp

index 191d3e9..f925a27 100644 (file)
@@ -236,6 +236,15 @@ void ThreadSynchronization::UpdateOnce()
   LOG_EVENT_TRACE;
   LOG_EVENT( "UPDATE ONCE" );
 
+  // If we're sleeping then change state to running as this will also wake up the v-sync-thread
+  {
+    ConditionalWait::ScopedLock lock( mUpdateThreadWaitCondition );
+    if( mState == State::SLEEPING )
+    {
+      mState = State::RUNNING;
+    }
+  }
+
   mUpdateThreadWaitCondition.Notify();
 }
 
index 01b16f6..141d78a 100644 (file)
@@ -1117,7 +1117,7 @@ void Indicator::DataReceived( void* event )
     case OP_UPDATE:
     {
       DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "Indicator client received: OP_UPDATE\n" );
-      if( mPixmap != 0 && mIsShowing )
+      if( mIsShowing )
       {
         mAdaptor->RequestUpdateOnce();
       }