MessageQueue now correctly reports that an update is not required 89/20289/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 25 Apr 2014 12:11:47 +0000 (13:11 +0100)
committerDavid Steele <david.steele@partner.samsung.com>
Thu, 1 May 2014 14:29:25 +0000 (15:29 +0100)
[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 <adeel.kazmi@samsung.com>
dali/internal/update/queue/update-message-queue.cpp

index 185b9bb..6722aa9 100644 (file)
@@ -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();