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

Allows messages to be queued for RenderManager, during the scene-graph Update. More...

#include <render-queue.h>

Collaboration diagram for Dali::Internal::SceneGraph::RenderQueue:
Collaboration graph
[legend]

Public Member Functions

 RenderQueue ()
 Create a new RenderQueue. More...
 
 ~RenderQueue ()
 Non-virtual destructor; RenderQueue is not suitable as a base class. More...
 
unsigned int * ReserveMessageSlot (BufferIndex updateBufferIndex, std::size_t size)
 Reserve space for another message in the queue; this must then be initialized by the caller. More...
 
void ProcessMessages (BufferIndex bufferIndex)
 Process the batch of messages, which were queued in the previous update. More...
 

Private Member Functions

MessageBufferGetCurrentContainer (BufferIndex bufferIndex)
 Helper to retrieve the current container. More...
 
void LimitBufferCapacity (BufferIndex bufferIndex)
 Helper to limit the buffer capacity i.e. More...
 
 RenderQueue (const RenderQueue &)
 
RenderQueueoperator= (const RenderQueue &rhs)
 

Private Attributes

MessageBuffercontainer0
 Messages are queued here when the update buffer index == 0. More...
 
MessageBuffercontainer1
 Messages are queued here when the update buffer index == 1. More...
 

Detailed Description

Allows messages to be queued for RenderManager, during the scene-graph Update.

Definition at line 39 of file render-queue.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::RenderQueue::RenderQueue ( )
Dali::Internal::SceneGraph::RenderQueue::~RenderQueue ( )

Non-virtual destructor; RenderQueue is not suitable as a base class.

Definition at line 49 of file render-queue.cpp.

References Dali::Internal::MessageBuffer::Begin(), container0, container1, Dali::Internal::MessageBuffer::Iterator::IsValid(), and Dali::Internal::MessageBase::~MessageBase().

Here is the call graph for this function:

Dali::Internal::SceneGraph::RenderQueue::RenderQueue ( const RenderQueue )
private

Member Function Documentation

MessageBuffer * Dali::Internal::SceneGraph::RenderQueue::GetCurrentContainer ( BufferIndex  bufferIndex)
private

Helper to retrieve the current container.

The update-thread queues messages with one container, whilst the render-thread is processing the other.

Parameters
[in]bufferIndexThe current buffer index.
Returns
The container.

The update-thread queues messages with one container, whilst the render-thread is processing the other.

Definition at line 104 of file render-queue.cpp.

References container0, and container1.

Referenced by ProcessMessages(), and ReserveMessageSlot().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderQueue::LimitBufferCapacity ( BufferIndex  bufferIndex)
private

Helper to limit the buffer capacity i.e.

after a frame when an extreme number of messages have been sent.

Parameters
[in]bufferIndexThe current buffer index.

Definition at line 124 of file render-queue.cpp.

References container0, container1, and Dali::Internal::anonymous_namespace{event-processor.cpp}::INITIAL_BUFFER_SIZE.

Referenced by ProcessMessages().

Here is the caller graph for this function:

RenderQueue& Dali::Internal::SceneGraph::RenderQueue::operator= ( const RenderQueue rhs)
private
void Dali::Internal::SceneGraph::RenderQueue::ProcessMessages ( BufferIndex  bufferIndex)

Process the batch of messages, which were queued in the previous update.

Precondition
This message should only be called by RenderManager from within the render-thread.
Parameters
[in]bufferIndexThe previous update buffer index.

Definition at line 85 of file render-queue.cpp.

References Dali::Internal::MessageBuffer::Begin(), GetCurrentContainer(), Dali::Internal::MessageBuffer::Iterator::IsValid(), LimitBufferCapacity(), Dali::Internal::MessageBase::Process(), Dali::Internal::MessageBuffer::Reset(), and Dali::Internal::MessageBase::~MessageBase().

Referenced by Dali::Internal::SceneGraph::RenderManager::Render().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int * Dali::Internal::SceneGraph::RenderQueue::ReserveMessageSlot ( BufferIndex  updateBufferIndex,
std::size_t  size 
)

Reserve space for another message in the queue; this must then be initialized by the caller.

The message will be read from the next render-thread tick.

Postcondition
Calling this method may invalidate any previously returned slots.
Parameters
[in]updateBufferIndexThe current update buffer index.
[in]sizeThe message size with respect to the size of type "char".
Returns
A pointer to the first char allocated for the message.

Definition at line 78 of file render-queue.cpp.

References GetCurrentContainer(), and Dali::Internal::MessageBuffer::ReserveMessageSlot().

Referenced by Dali::Internal::SceneGraph::RenderMessageDispatcher::AddGeometry(), Dali::Internal::SceneGraph::RenderMessageDispatcher::AddPropertyBuffer(), Dali::Internal::SceneGraph::UpdateManager::AddPropertyBuffer(), Dali::Internal::SceneGraph::RenderMessageDispatcher::AddRenderer(), Dali::Internal::SceneGraph::RenderMessageDispatcher::AddRenderTracker(), Dali::Internal::SceneGraph::UpdateManager::AddSampler(), Dali::Internal::SceneGraph::UpdateManager::AddShader(), Dali::Internal::SceneGraph::TextureCache::DispatchCreateGlTexture(), Dali::Internal::SceneGraph::TextureCache::DispatchCreateTexture(), Dali::Internal::SceneGraph::TextureCache::DispatchCreateTextureForBitmap(), Dali::Internal::SceneGraph::TextureCache::DispatchCreateTextureForFrameBuffer(), Dali::Internal::SceneGraph::TextureCache::DispatchCreateTextureForNativeImage(), Dali::Internal::SceneGraph::TextureCache::DispatchDiscardTexture(), Dali::Internal::SceneGraph::TextureCache::DispatchUpdateTexture(), Dali::Internal::SceneGraph::TextureCache::DispatchUpdateTextureArea(), Dali::Internal::SceneGraph::Shader::ForwardCoordinateType(), Dali::Internal::SceneGraph::Shader::ForwardGridDensity(), Dali::Internal::SceneGraph::Shader::ForwardHints(), Dali::Internal::SceneGraph::Shader::ForwardTextureId(), Dali::Internal::SceneGraph::Shader::ForwardUniformMeta(), Dali::Internal::SceneGraph::Renderer::PrepareRender(), Dali::Internal::SceneGraph::RenderMessageDispatcher::RemoveGeometry(), Dali::Internal::SceneGraph::RenderMessageDispatcher::RemovePropertyBuffer(), Dali::Internal::SceneGraph::UpdateManager::RemovePropertyBuffer(), Dali::Internal::SceneGraph::RenderMessageDispatcher::RemoveRenderer(), Dali::Internal::SceneGraph::RenderMessageDispatcher::RemoveRenderTracker(), Dali::Internal::SceneGraph::UpdateManager::RemoveSampler(), Dali::Internal::SceneGraph::UpdateManager::SetBackgroundColor(), Dali::Internal::SceneGraph::UpdateManager::SetDefaultSurfaceRect(), Dali::Internal::SceneGraph::UpdateManager::SetFilterMode(), Dali::Internal::SceneGraph::RenderMessageDispatcher::SetGeometryRequiresDepthTest(), Dali::Internal::SceneGraph::RenderMessageDispatcher::SetGeometryType(), Dali::Internal::SceneGraph::UpdateManager::SetPropertyBufferData(), Dali::Internal::SceneGraph::UpdateManager::SetPropertyBufferFormat(), Dali::Internal::SceneGraph::UpdateManager::SetPropertyBufferSize(), Dali::Internal::SceneGraph::UpdateManager::SetShaderProgram(), and Dali::Internal::SceneGraph::UpdateManager::SetWrapMode().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

MessageBuffer* Dali::Internal::SceneGraph::RenderQueue::container0
private

Messages are queued here when the update buffer index == 0.

Definition at line 94 of file render-queue.h.

Referenced by GetCurrentContainer(), LimitBufferCapacity(), RenderQueue(), and ~RenderQueue().

MessageBuffer* Dali::Internal::SceneGraph::RenderQueue::container1
private

Messages are queued here when the update buffer index == 1.

Definition at line 95 of file render-queue.h.

Referenced by GetCurrentContainer(), LimitBufferCapacity(), RenderQueue(), and ~RenderQueue().


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