From 629b8b826e5012d348fabd39d06614270b7b5029 Mon Sep 17 00:00:00 2001 From: Jonghyun Ho Date: Fri, 28 Aug 2015 20:38:59 +0900 Subject: [PATCH] Fix the issue that indicator is not updated & ensure UpdateOnce works if we're asleep [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 | 9 +++++++++ adaptors/common/indicator-impl.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/adaptors/base/thread-synchronization.cpp b/adaptors/base/thread-synchronization.cpp index 191d3e9..f925a27 100644 --- a/adaptors/base/thread-synchronization.cpp +++ b/adaptors/base/thread-synchronization.cpp @@ -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(); } diff --git a/adaptors/common/indicator-impl.cpp b/adaptors/common/indicator-impl.cpp index 01b16f6..141d78a 100644 --- a/adaptors/common/indicator-impl.cpp +++ b/adaptors/common/indicator-impl.cpp @@ -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(); } -- 2.7.4