Dali 3D User Interface Engine
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
Dali::Internal::Update::MessageQueue Class Reference

Used by UpdateManager to receive messages from the event-thread. More...

#include <update-message-queue.h>

Collaboration diagram for Dali::Internal::Update::MessageQueue:
Collaboration graph
[legend]

Classes

struct  Impl
 Private MessageQueue data. More...
 

Public Member Functions

 MessageQueue (Integration::RenderController &renderController, const SceneGraph::SceneGraphBuffers &sceneGraphBuffers)
 Create a new UpdateMessageQueue. More...
 
 ~MessageQueue ()
 Destructor. More...
 
void EventProcessingStarted ()
 Inform the queue that event processing has started. More...
 
unsigned int * ReserveMessageSlot (unsigned int size, bool updateScene)
 Reserve space for a message. More...
 
bool FlushQueue ()
 Flushes the message queue. More...
 
void ProcessMessages (BufferIndex updateBufferIndex)
 Called once per update; process the previously flushed messages. More...
 
bool WasEmpty () const
 Query whether the queue was empty this frame. More...
 
bool IsSceneUpdateRequired () const
 Query whether the queue contains at least one message that requires that the scene-graph node tree be updated. More...
 

Private Member Functions

void ProcessMinorQueue (char *minorQueue)
 Helper to call Process and destructor on each queued message. More...
 
 MessageQueue (const MessageQueue &rhs)
 
MessageQueueoperator= (const MessageQueue &rhs)
 

Private Attributes

ImplmImpl
 

Detailed Description

Used by UpdateManager to receive messages from the event-thread.

Definition at line 49 of file update-message-queue.h.

Constructor & Destructor Documentation

Dali::Internal::Update::MessageQueue::MessageQueue ( Integration::RenderController renderController,
const SceneGraph::SceneGraphBuffers sceneGraphBuffers 
)

Create a new UpdateMessageQueue.

Parameters
[in]renderControllerAfter messages are flushed, we request a render from the RenderController.
[in]sceneGraphBuffersUsed to keep track of which buffers are being written or read.

Definition at line 135 of file update-message-queue.cpp.

References mImpl.

Dali::Internal::Update::MessageQueue::~MessageQueue ( )

Destructor.

Definition at line 141 of file update-message-queue.cpp.

References mImpl.

Dali::Internal::Update::MessageQueue::MessageQueue ( const MessageQueue rhs)
private

Member Function Documentation

void Dali::Internal::Update::MessageQueue::EventProcessingStarted ( )

Inform the queue that event processing has started.

Definition at line 146 of file update-message-queue.cpp.

References mImpl, and Dali::Internal::Update::MessageQueue::Impl::processingEvents.

Referenced by Dali::Internal::SceneGraph::UpdateManager::EventProcessingStarted().

Here is the caller graph for this function:

bool Dali::Internal::Update::MessageQueue::FlushQueue ( )
bool Dali::Internal::Update::MessageQueue::IsSceneUpdateRequired ( ) const

Query whether the queue contains at least one message that requires that the scene-graph node tree be updated.

Returns
A flag, true if the scene graph needs an update

Definition at line 281 of file update-message-queue.cpp.

References mImpl, and Dali::Internal::Update::MessageQueue::Impl::sceneUpdate.

Referenced by Dali::Internal::SceneGraph::UpdateManager::Update().

Here is the caller graph for this function:

MessageQueue& Dali::Internal::Update::MessageQueue::operator= ( const MessageQueue rhs)
private
void Dali::Internal::Update::MessageQueue::ProcessMessages ( BufferIndex  updateBufferIndex)
void Dali::Internal::Update::MessageQueue::ProcessMinorQueue ( char *  minorQueue)
private

Helper to call Process and destructor on each queued message.

Parameters
[in]minorQueueThe queue to process.
unsigned int * Dali::Internal::Update::MessageQueue::ReserveMessageSlot ( unsigned int  size,
bool  updateScene 
)

Reserve space for a message.

Parameters
[in]sizethe message size with respect to the size of type 'char'
[in]updateSceneIf set to true, denotes that the message will cause the scene graph node tree to require an update
Returns
A pointer to the first char allocated for the message

Definition at line 151 of file update-message-queue.cpp.

References Dali::Internal::Update::MessageQueue::Impl::currentMessageBuffer, DALI_ASSERT_DEBUG, Dali::Internal::Update::MessageQueue::Impl::freeQueue, Dali::Internal::anonymous_namespace{event-processor.cpp}::INITIAL_BUFFER_SIZE, mImpl, Dali::Internal::Update::MessageQueue::Impl::processingEvents, Dali::Internal::Update::MessageQueue::Impl::renderController, Dali::Integration::RenderController::RequestProcessEventsOnIdle(), Dali::Internal::MessageBuffer::ReserveMessageSlot(), and Dali::Internal::Update::MessageQueue::Impl::sceneUpdateFlag.

Referenced by Dali::Internal::SceneGraph::UpdateManager::ReserveMessageSlot().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::Update::MessageQueue::WasEmpty ( ) const

Query whether the queue was empty this frame.

Definition at line 276 of file update-message-queue.cpp.

References mImpl, and Dali::Internal::Update::MessageQueue::Impl::queueWasEmpty.

Member Data Documentation

Impl* Dali::Internal::Update::MessageQueue::mImpl
private

The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali