From 330b60abdec4860a4e912475d7d9504220dc4cf3 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Fri, 25 Apr 2014 13:11:47 +0100 Subject: [PATCH] MessageQueue now correctly reports that an update is not required [Problem] The message queue always reports that it has messages even if it does not. [Cause] The sceneUpdate counter never gets decremented to 0. This causes the update to run every time. [Solution] It was being cleared within a for loop where messages are being processed, it should be outside this loop so is cleared if there are no messages. Change-Id: I1d490c9c25f07813f2f904d659e5116e6b27a50c Signed-off-by: Adeel Kazmi --- dali/internal/update/queue/update-message-queue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dali/internal/update/queue/update-message-queue.cpp b/dali/internal/update/queue/update-message-queue.cpp index 185b9bb..6722aa9 100644 --- a/dali/internal/update/queue/update-message-queue.cpp +++ b/dali/internal/update/queue/update-message-queue.cpp @@ -274,10 +274,10 @@ void MessageQueue::ProcessMessages() // Pass back for use in the event-thread mImpl->recycleQueue.push_back( buffer ); - - mImpl->sceneUpdate >>= 1; } + mImpl->sceneUpdate >>= 1; + mImpl->queueWasEmpty = mImpl->processQueue.empty(); // Flag whether we processed anything mImpl->processQueue.clear(); -- 2.7.4