summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
103930b)
There was a timing issue where UpdateManager's updateScene could be
false, but the messageQueue flushed messages to the process queue just
prior to ProcessSMessages being called which updated the scene graph.
Have ensured that ProcessMessages returns true if there were updates
to the scene graph, and changed UpdateManager to process the scene
appropriately.
Change-Id: I773f5eae2820ad1d93a78d0f3c784a7592ea320a
Signed-off-by: David Steele <david.steele@samsung.com>
//Process Touches & Gestures
const bool gestureUpdated = ProcessGestures( bufferIndex, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds );
//Process Touches & Gestures
const bool gestureUpdated = ProcessGestures( bufferIndex, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds );
- const bool updateScene = // The scene-graph requires an update if..
+ bool updateScene = // The scene-graph requires an update if..
(mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
IsAnimationRunning() || // ..at least one animation is running OR
mImpl->messageQueue.IsSceneUpdateRequired() || // ..a message that modifies the scene graph node tree is queued OR
(mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
IsAnimationRunning() || // ..at least one animation is running OR
mImpl->messageQueue.IsSceneUpdateRequired() || // ..a message that modifies the scene graph node tree is queued OR
mImpl->transformManager.ResetToBaseValue();
}
mImpl->transformManager.ResetToBaseValue();
}
- //Process the queued scene messages
- mImpl->messageQueue.ProcessMessages( bufferIndex );
+ // Process the queued scene messages. Note, MessageQueue::FlushQueue may be called
+ // between calling IsSceneUpdateRequired() above and here, so updateScene should
+ // be set again
+ updateScene |= mImpl->messageQueue.ProcessMessages( bufferIndex );
//Post Process Ids of resources updated by renderer
mImpl->resourceManager.PostProcessResources( bufferIndex );
//Post Process Ids of resources updated by renderer
mImpl->resourceManager.PostProcessResources( bufferIndex );
void MessageQueue::EventProcessingStarted()
{
void MessageQueue::EventProcessingStarted()
{
- mImpl->processingEvents = true;
+ mImpl->processingEvents = true; // called from event thread
+// Called from event thread
unsigned int* MessageQueue::ReserveMessageSlot( unsigned int requestedSize, bool updateScene )
{
DALI_ASSERT_DEBUG( 0 != requestedSize );
unsigned int* MessageQueue::ReserveMessageSlot( unsigned int requestedSize, bool updateScene )
{
DALI_ASSERT_DEBUG( 0 != requestedSize );
return mImpl->currentMessageBuffer->ReserveMessageSlot( requestedSize );
}
return mImpl->currentMessageBuffer->ReserveMessageSlot( requestedSize );
}
+// Called from event thread
bool MessageQueue::FlushQueue()
{
const bool messagesToProcess = ( NULL != mImpl->currentMessageBuffer );
bool MessageQueue::FlushQueue()
{
const bool messagesToProcess = ( NULL != mImpl->currentMessageBuffer );
return messagesToProcess;
}
return messagesToProcess;
}
-void MessageQueue::ProcessMessages( BufferIndex updateBufferIndex )
+bool MessageQueue::ProcessMessages( BufferIndex updateBufferIndex )
{
PERF_MONITOR_START(PerformanceMonitor::PROCESS_MESSAGES);
{
PERF_MONITOR_START(PerformanceMonitor::PROCESS_MESSAGES);
mImpl->processQueue.clear();
PERF_MONITOR_END(PerformanceMonitor::PROCESS_MESSAGES);
mImpl->processQueue.clear();
PERF_MONITOR_END(PerformanceMonitor::PROCESS_MESSAGES);
+
+ return ( mImpl->sceneUpdate & 0x01 ); // if it was previously 2, scene graph was updated.
}
bool MessageQueue::WasEmpty() const
}
bool MessageQueue::WasEmpty() const
/**
* Called once per update; process the previously flushed messages.
* @param updateBufferIndex to use
/**
* Called once per update; process the previously flushed messages.
* @param updateBufferIndex to use
+ * @return true if the scene graph node tree is updated
- void ProcessMessages( BufferIndex updateBufferIndex );
+ bool ProcessMessages( BufferIndex updateBufferIndex );
/**
* Query whether the queue was empty this frame.
/**
* Query whether the queue was empty this frame.