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

RenderTasks describe how the Dali scene should be rendered. More...

#include <scene-graph-render-task.h>

Inheritance diagram for Dali::Internal::SceneGraph::RenderTask:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::SceneGraph::RenderTask:
Collaboration graph
[legend]

Public Types

enum  State { RENDER_CONTINUOUSLY, RENDER_ONCE_WAITING_FOR_RESOURCES, RENDERED_ONCE, RENDERED_ONCE_AND_NOTIFIED }
 

Public Member Functions

virtual ~RenderTask ()
 Virtual destructor. More...
 
void Initialize (RenderMessageDispatcher &renderMessageDispatcher, ResourceManager &resourceManager)
 Initialize the render task. More...
 
void SetSourceNode (Node *node)
 Set the nodes to be rendered. More...
 
NodeGetSourceNode () const
 Retrieve the source node. More...
 
void SetExclusive (bool exclusive)
 Set whether the RenderTask has exclusive access to the source nodes. More...
 
bool IsExclusive () const
 Query whether the RenderTask has exclusive access to the source actors. More...
 
void SetCameraNode (Node *node)
 Set the node from which the scene is viewed. More...
 
void SetFrameBufferId (unsigned int resourceId, bool isNativeFBO)
 Set the frame-buffer used as a render target. More...
 
unsigned int GetFrameBufferId () const
 Retrieve the resource ID of the frame-buffer. More...
 
void SetViewportPosition (BufferIndex updateBufferIndex, const Vector2 &value)
 Set the value of property viewportPosition This value will persist only for the current frame. More...
 
const Vector2GetViewportPosition (BufferIndex bufferIndex) const
 Get the value of property viewportPosition. More...
 
void BakeViewportPosition (BufferIndex updateBufferIndex, const Vector2 &value)
 Bake the value of the property viewportPosition This will also set the base value. More...
 
void SetViewportSize (BufferIndex updateBufferIndex, const Vector2 &value)
 Set the value of property viewportSize This value will persist only for the current frame. More...
 
const Vector2GetViewportSize (BufferIndex bufferIndex) const
 Get the value of property viewportSize. More...
 
void BakeViewportSize (BufferIndex updateBufferIndex, const Vector2 &value)
 Bake the value of the property viewportSize This will also set the base value. More...
 
bool GetViewportEnabled (BufferIndex bufferIndex) const
 Get the value of property viewportEnabled. More...
 
bool QueryViewport (BufferIndex bufferIndex, Viewport &viewport) const
 Query whether the optional viewport is set. More...
 
void SetClearColor (BufferIndex updateBufferIndex, const Vector4 &value)
 Set the value of property clearColor This value will persist only for the current frame. More...
 
const Vector4GetClearColor (BufferIndex bufferIndex) const
 Get the value of property clearColor. More...
 
void BakeClearColor (BufferIndex updateBufferIndex, const Vector4 &value)
 Bake the value of the property clearColor This will also set the base value. More...
 
void SetClearEnabled (bool enabled)
 Set whether the render-task will clear the results of previous render-tasks. More...
 
bool GetClearEnabled () const
 Query whether the render-task will clear the results of previous render-tasks. More...
 
void SetCullMode (bool mode)
 Set whether the render task will cull the actors to the camera's view frustum. More...
 
bool GetCullMode () const
 Get the cull mode. More...
 
void SetRefreshRate (unsigned int refreshRate)
 Set the refresh-rate of the RenderTask. More...
 
unsigned int GetRefreshRate () const
 Retrieve the refresh-rate of the RenderTask. More...
 
bool ReadyToRender (BufferIndex updateBufferIndex)
 Check if the render task is ready for rendering. More...
 
bool IsRenderRequired ()
 True if a render is required. More...
 
void SetResourcesFinished (bool resourcesFinished)
 Set whether all resources were available when the render-task was processed. More...
 
void UpdateState ()
 Process a frame. More...
 
bool IsWaitingToRender ()
 Return true only if currently waiting for the render task to finish rendering and the update thread should be kept alive. More...
 
bool HasRendered ()
 Return true when the render task has finished rendering and a notification needs sending. More...
 
unsigned int GetRenderedOnceCounter () const
 
const MatrixGetViewMatrix (BufferIndex bufferIndex) const
 Retrieve the view-matrix; this is double buffered for input handling. More...
 
SceneGraph::CameraAttachmentGetCameraAttachment () const
 Retrieve the camera attachment. More...
 
const MatrixGetProjectionMatrix (BufferIndex bufferIndex) const
 Retrieve the projection-matrix; this is double buffered for input handling. More...
 
void PrepareRenderInstruction (RenderInstruction &instruction, BufferIndex updateBufferIndex)
 Prepares the render-instruction buffer to be populated with instructions. More...
 
bool ViewMatrixUpdated ()
 
NodeGetCamera () const
 
- Public Member Functions inherited from Dali::Internal::SceneGraph::PropertyOwner
virtual ~PropertyOwner ()
 Virtual destructor; this is intended as a base class. More...
 
void AddObserver (Observer &observer)
 Add an observer. More...
 
void RemoveObserver (Observer &observer)
 Remove an observer. More...
 
bool IsObserved ()
 This method can be used to determine if there is an animation or constraint that is using this property owner. More...
 
void Destroy ()
 Called just before destruction to disconnect all observers and remove constraints. More...
 
void ConnectToSceneGraph ()
 Notify all observers that the object has been connected This occurs when the object is connected to the scene-graph during UpdateManager::Update(). More...
 
void DisconnectFromSceneGraph (BufferIndex updateBufferIndex)
 Notify all observers that the object has been disconnected and remove constraints. More...
 
void InstallCustomProperty (PropertyBase *property)
 Install a custom property. More...
 
OwnedPropertyContainerGetCustomProperties ()
 Retrieve the custom properties owned by the object. More...
 
const OwnedPropertyContainerGetCustomProperties () const
 Retrieve the custom properties owned by the object. More...
 
void ResetToBaseValues (BufferIndex updateBufferIndex)
 Reset animatable properties to the corresponding base values. More...
 
void ApplyConstraint (ConstraintBase *constraint)
 Apply a constraint. More...
 
void RemoveConstraint (ConstraintBase *constraint)
 Begin removal of constraints. More...
 
ConstraintOwnerContainerGetConstraints ()
 Retrieve the constraints that are currently applied. More...
 
virtual void AddUniformMapping (UniformPropertyMapping *map)
 Add a map to the mappings table. More...
 
virtual void RemoveUniformMapping (const std::string &uniformName)
 Remove a map from the mappings table. More...
 
const UniformMapGetUniformMap () const
 Get the mappings table. More...
 
void AddUniformMapObserver (UniformMap::Observer &observer)
  More...
 
void RemoveUniformMapObserver (UniformMap::Observer &observer)
  More...
 

Static Public Member Functions

static RenderTaskNew ()
 Create a new RenderTask. More...
 
- Static Public Member Functions inherited from Dali::Internal::SceneGraph::PropertyOwner
static PropertyOwnerNew ()
 Create a property owner. More...
 

Public Attributes

AnimatableProperty< Vector2mViewportPosition
 viewportPosition More...
 
AnimatableProperty< Vector2mViewportSize
 viewportSize More...
 
AnimatableProperty< Vector4mClearColor
 clearColor More...
 

Private Member Functions

 RenderTask ()
 Protected constructor. More...
 
 RenderTask (const RenderTask &)
 
RenderTaskoperator= (const RenderTask &)
 
virtual void ResetDefaultProperties (BufferIndex currentBufferIndex)
 Called after ResetToBaseValues; derived classes should reset any default properties. More...
 

Private Attributes

RenderMessageDispatchermRenderMessageDispatcher
 
ResourceManagermResourceManager
 
Render::RenderTrackermRenderSyncTracker
 
NodemSourceNode
 
NodemCameraNode
 
CameraAttachmentmCameraAttachment
 
unsigned int mFrameBufferResourceId
 
bool mResourcesFinished:1
 True if all resources were available when the render-task was processed. More...
 
bool mWaitingToRender:1
 True when an render once to FBO is waiting. More...
 
bool mNotifyTrigger:1
 True if a render once render task has finished renderering. More...
 
bool mExclusive: 1
 Whether the render task has exclusive access to the source actor (node in the scene graph implementation). More...
 
bool mClearEnabled: 1
 Whether previous results are cleared. More...
 
bool mCullMode: 1
 Whether renderers should be frustum culled. More...
 
FrameBufferTexturemRenderTarget
 
Viewport mViewport
 
State mState
 Render state. More...
 
unsigned int mRefreshRate
 REFRESH_ONCE, REFRESH_ALWAYS or render every N frames. More...
 
unsigned int mFrameCounter
 counter for rendering every N frames More...
 
unsigned int mRenderedOnceCounter
 Incremented whenever state changes to RENDERED_ONCE_AND_NOTIFIED. More...
 
bool mTargetIsNativeFramebuffer
 Tells if our target is a native framebuffer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::Internal::SceneGraph::PropertyOwner
 PropertyOwner ()
 Protected constructor. More...
 
- Protected Attributes inherited from Dali::Internal::SceneGraph::PropertyOwner
OwnedPropertyContainer mCustomProperties
 Properties provided with InstallCustomProperty() More...
 
UniformMap mUniformMaps
 Container of owned uniform maps. More...
 

Detailed Description

RenderTasks describe how the Dali scene should be rendered.

Definition at line 53 of file scene-graph-render-task.h.

Member Enumeration Documentation

Enumerator
RENDER_CONTINUOUSLY 

mRefreshRate > 0

RENDER_ONCE_WAITING_FOR_RESOURCES 

mRefreshRate = REFRESH_ONCE

RENDERED_ONCE 

mRefreshRate = REFRESH_ONCE & rendered

RENDERED_ONCE_AND_NOTIFIED 

mRefreshRate = REFRESH_ONCE & rendered & notified

Definition at line 57 of file scene-graph-render-task.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::RenderTask::~RenderTask ( )
virtual
Dali::Internal::SceneGraph::RenderTask::RenderTask ( )
private

Protected constructor.

Definition at line 505 of file scene-graph-render-task.cpp.

Referenced by New().

Here is the caller graph for this function:

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

Member Function Documentation

void Dali::Internal::SceneGraph::RenderTask::BakeClearColor ( BufferIndex  updateBufferIndex,
const Vector4 value 
)

Bake the value of the property clearColor This will also set the base value.

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]valueThe new value for property.

Definition at line 163 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::AnimatableProperty< Vector4 >::Bake(), and mClearColor.

Referenced by Dali::Internal::SceneGraph::BakeClearColorMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::BakeViewportPosition ( BufferIndex  updateBufferIndex,
const Vector2 value 
)

Bake the value of the property viewportPosition This will also set the base value.

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]valueThe new value for property.

Definition at line 459 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::AnimatableProperty< Vector2 >::Bake(), and mViewportPosition.

Referenced by Dali::Internal::SceneGraph::BakeViewportPositionMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::BakeViewportSize ( BufferIndex  updateBufferIndex,
const Vector2 value 
)

Bake the value of the property viewportSize This will also set the base value.

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]valueThe new value for property.

Definition at line 474 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::AnimatableProperty< Vector2 >::Bake(), and mViewportSize.

Referenced by Dali::Internal::SceneGraph::BakeViewportSizeMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

Node * Dali::Internal::SceneGraph::RenderTask::GetCamera ( ) const
Returns
A pointer to the camera used by the RenderTask

Definition at line 492 of file scene-graph-render-task.cpp.

References mCameraNode.

Referenced by Dali::Internal::SceneGraph::PrepareRenderInstruction().

Here is the caller graph for this function:

SceneGraph::CameraAttachment & Dali::Internal::SceneGraph::RenderTask::GetCameraAttachment ( ) const

Retrieve the camera attachment.

Precondition
GetCameraNode() returns a node with valid CameraAttachment.
Returns
The camera attachment.

Definition at line 393 of file scene-graph-render-task.cpp.

References DALI_ASSERT_DEBUG, and mCameraAttachment.

Referenced by Dali::Internal::SceneGraph::PrepareRenderInstruction().

Here is the caller graph for this function:

const Vector4 & Dali::Internal::SceneGraph::RenderTask::GetClearColor ( BufferIndex  bufferIndex) const

Get the value of property clearColor.

Warning
Should only be called from the Update thread
Parameters
[in]bufferIndexThe buffer to read from.
Returns
the value of the property.

Definition at line 158 of file scene-graph-render-task.cpp.

References mClearColor.

Referenced by Dali::Internal::RenderTask::GetClearColor(), and PrepareRenderInstruction().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::GetClearEnabled ( ) const

Query whether the render-task will clear the results of previous render-tasks.

.0

Returns
True if the render-task should clear.

Definition at line 173 of file scene-graph-render-task.cpp.

References mClearEnabled.

bool Dali::Internal::SceneGraph::RenderTask::GetCullMode ( ) const

Get the cull mode.

.0

Returns
True if the render task should cull the actors to the camera's view frustum

Definition at line 183 of file scene-graph-render-task.cpp.

References mCullMode.

Referenced by Dali::Internal::SceneGraph::ProcessRenderTasks().

Here is the caller graph for this function:

unsigned int Dali::Internal::SceneGraph::RenderTask::GetFrameBufferId ( ) const

Retrieve the resource ID of the frame-buffer.

Returns
The resource ID, or zero if not rendering off-screen.

Definition at line 133 of file scene-graph-render-task.cpp.

References mFrameBufferResourceId.

Referenced by PrepareRenderInstruction(), and Dali::Internal::SceneGraph::ProcessRenderTasks().

Here is the caller graph for this function:

const Matrix & Dali::Internal::SceneGraph::RenderTask::GetProjectionMatrix ( BufferIndex  bufferIndex) const

Retrieve the projection-matrix; this is double buffered for input handling.

Precondition
GetCameraNode() returns a node with valid CameraAttachment.
Parameters
[in]bufferIndexThe buffer to read from.
Returns
The projection-matrix.

Definition at line 399 of file scene-graph-render-task.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::SceneGraph::CameraAttachment::GetProjectionMatrix(), and mCameraAttachment.

Here is the call graph for this function:

unsigned int Dali::Internal::SceneGraph::RenderTask::GetRefreshRate ( ) const

Retrieve the refresh-rate of the RenderTask.

Returns
The refresh rate.

Definition at line 210 of file scene-graph-render-task.cpp.

References mRefreshRate.

unsigned int Dali::Internal::SceneGraph::RenderTask::GetRenderedOnceCounter ( ) const
Returns
The number of times we have transited from RENDERED_ONCE to RENDERED_ONCE_AND_NOTIFIED state.

Definition at line 380 of file scene-graph-render-task.cpp.

References mRenderedOnceCounter.

Referenced by Dali::Internal::RenderTask::HasFinished().

Here is the caller graph for this function:

Node * Dali::Internal::SceneGraph::RenderTask::GetSourceNode ( ) const

Retrieve the source node.

Returns
This node and its children will be rendered.

Definition at line 83 of file scene-graph-render-task.cpp.

References mSourceNode.

Referenced by Dali::Internal::SceneGraph::ProcessRenderTasks().

Here is the caller graph for this function:

const Matrix & Dali::Internal::SceneGraph::RenderTask::GetViewMatrix ( BufferIndex  bufferIndex) const

Retrieve the view-matrix; this is double buffered for input handling.

Precondition
GetCameraNode() returns a node with valid CameraAttachment.
Parameters
[in]bufferIndexThe buffer to read from.
Returns
The view-matrix.

Definition at line 386 of file scene-graph-render-task.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::SceneGraph::CameraAttachment::GetViewMatrix(), and mCameraAttachment.

Referenced by Dali::Internal::SceneGraph::PrepareRenderInstruction().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::GetViewportEnabled ( BufferIndex  bufferIndex) const

Get the value of property viewportEnabled.

Warning
Should only be called from the Update thread
Parameters
[in]bufferIndexThe buffer to read from.
Returns
the value of the property.

Definition at line 479 of file scene-graph-render-task.cpp.

References height, Dali::Math::MACHINE_EPSILON_1, mViewportPosition, mViewportSize, and width.

Referenced by Dali::Internal::RenderTask::GetViewport(), and QueryViewport().

Here is the caller graph for this function:

const Vector2 & Dali::Internal::SceneGraph::RenderTask::GetViewportPosition ( BufferIndex  bufferIndex) const

Get the value of property viewportPosition.

Warning
Should only be called from the Update thread
Parameters
[in]bufferIndexThe buffer to read from.
Returns
the value of the property.

Definition at line 454 of file scene-graph-render-task.cpp.

References mViewportPosition.

Referenced by Dali::Internal::RenderTask::GetCurrentViewportPosition(), and Dali::Internal::RenderTask::GetViewport().

Here is the caller graph for this function:

const Vector2 & Dali::Internal::SceneGraph::RenderTask::GetViewportSize ( BufferIndex  bufferIndex) const

Get the value of property viewportSize.

Warning
Should only be called from the Update thread
Parameters
[in]bufferIndexThe buffer to read from.
Returns
the value of the property.

Definition at line 469 of file scene-graph-render-task.cpp.

References mViewportSize.

Referenced by Dali::Internal::RenderTask::GetCurrentViewportSize(), and Dali::Internal::RenderTask::GetViewport().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::HasRendered ( )

Return true when the render task has finished rendering and a notification needs sending.

(Only one notification is sent per render once request)

Returns
true if notification is required.

Definition at line 365 of file scene-graph-render-task.cpp.

References mNotifyTrigger, mRenderedOnceCounter, mState, RENDERED_ONCE_AND_NOTIFIED, and TASK_LOG_FMT.

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

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::Initialize ( RenderMessageDispatcher renderMessageDispatcher,
ResourceManager resourceManager 
)

Initialize the render task.

Called in update thread

Parameters
[in]renderMessageDispatcherto send messages to render thread
[in]resourceManagerto check and update status of FBOs

Definition at line 60 of file scene-graph-render-task.cpp.

References mRenderMessageDispatcher, and mResourceManager.

Referenced by Dali::Internal::SceneGraph::RenderTaskList::AddTask().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::IsExclusive ( ) const

Query whether the RenderTask has exclusive access to the source actors.

Returns
True if the source actors will only be rendered by this render-task.

Definition at line 105 of file scene-graph-render-task.cpp.

References mExclusive.

bool Dali::Internal::SceneGraph::RenderTask::IsRenderRequired ( )

True if a render is required.

If the current state is RENDER_CONTINUOUSLY, then this returns true if the frame count is zero. If the current state is RENDER_ONCE_WAITING_FOR_RESOURCES, then it always returns true. In all other states, it returns false.

Returns
true if a render is required

Definition at line 245 of file scene-graph-render-task.cpp.

References mFrameCounter, mState, RENDER_CONTINUOUSLY, RENDER_ONCE_WAITING_FOR_RESOURCES, and TASK_LOG_FMT.

Referenced by Dali::Internal::SceneGraph::ProcessRenderTasks().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::IsWaitingToRender ( )

Return true only if currently waiting for the render task to finish rendering and the update thread should be kept alive.

Returns
true if waiting to be rendered

Definition at line 359 of file scene-graph-render-task.cpp.

References mState, mWaitingToRender, and TASK_LOG_FMT.

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

Here is the caller graph for this function:

RenderTask * Dali::Internal::SceneGraph::RenderTask::New ( )
static

Create a new RenderTask.

Definition at line 39 of file scene-graph-render-task.cpp.

References RenderTask().

Referenced by Dali::Internal::RenderTask::CreateSceneObject().

Here is the call graph for this function:

Here is the caller graph for this function:

RenderTask& Dali::Internal::SceneGraph::RenderTask::operator= ( const RenderTask )
private
void Dali::Internal::SceneGraph::RenderTask::PrepareRenderInstruction ( RenderInstruction instruction,
BufferIndex  updateBufferIndex 
)

Prepares the render-instruction buffer to be populated with instructions.

If the render task is a render-once framebuffer backed by a native image, then this method will ensure that a GL sync object is created to track when the rendering has finished.

Parameters
[out]instructionto prepare
[in]updateBufferIndexThe current update buffer index.

Definition at line 406 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::RenderMessageDispatcher::AddRenderTracker(), DALI_ASSERT_DEBUG, GetClearColor(), GetFrameBufferId(), mCameraAttachment, mClearEnabled, mRefreshRate, mRenderMessageDispatcher, mRenderSyncTracker, Dali::Internal::SceneGraph::RenderInstruction::mRenderTracker, mResourcesFinished, mTargetIsNativeFramebuffer, QueryViewport(), Dali::RenderTask::REFRESH_ONCE, Dali::Internal::SceneGraph::RenderInstruction::Reset(), and TASK_LOG.

Referenced by Dali::Internal::SceneGraph::PrepareRenderInstruction().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::QueryViewport ( BufferIndex  bufferIndex,
Viewport viewport 
) const

Query whether the optional viewport is set.

Parameters
[in]bufferIndexThe buffer to read from.
[out]viewportThe viewport position and size is populated.
Returns
true if the viewport has been set

Definition at line 138 of file scene-graph-render-task.cpp.

References GetViewportEnabled(), Dali::Rect< T >::height, mViewportPosition, mViewportSize, Dali::Rect< T >::width, Dali::Rect< T >::x, and Dali::Rect< T >::y.

Referenced by PrepareRenderInstruction().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::ReadyToRender ( BufferIndex  updateBufferIndex)

Check if the render task is ready for rendering.

Parameters
[in]updateBufferIndexThe current update buffer index.
Returns
True if the render-task is ready for rendering.

Definition at line 215 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::Node::GetParent(), Dali::Internal::SceneGraph::Node::HasAttachment(), Dali::Internal::SceneGraph::Node::IsRoot(), mCameraNode, mFrameBufferResourceId, mFrameCounter, mSourceNode, and TASK_LOG_FMT.

Referenced by Dali::Internal::SceneGraph::ProcessRenderTasks(), and Dali::Internal::SceneGraph::UpdateManager::Update().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::ResetDefaultProperties ( BufferIndex  updateBufferIndex)
privatevirtual

Called after ResetToBaseValues; derived classes should reset any default properties.

Parameters
[in]currentBufferIndexThe buffer to reset.

Reimplemented from Dali::Internal::SceneGraph::PropertyOwner.

Definition at line 497 of file scene-graph-render-task.cpp.

References mClearColor, mViewportPosition, mViewportSize, Dali::Internal::SceneGraph::AnimatableProperty< Vector2 >::ResetToBaseValue(), and Dali::Internal::SceneGraph::AnimatableProperty< Vector4 >::ResetToBaseValue().

Here is the call graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetCameraNode ( Node node)

Set the node from which the scene is viewed.

Parameters
[in]nodeThe scene is viewed from the perspective of this node.

Definition at line 110 of file scene-graph-render-task.cpp.

References DALI_ASSERT_DEBUG, Dali::Internal::SceneGraph::Node::GetAttachment(), mCameraAttachment, and mCameraNode.

Referenced by Dali::Internal::SceneGraph::SetCameraNodeMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetClearColor ( BufferIndex  updateBufferIndex,
const Vector4 value 
)

Set the value of property clearColor This value will persist only for the current frame.

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]valueThe value of the property

Definition at line 153 of file scene-graph-render-task.cpp.

References mClearColor, and Dali::Internal::SceneGraph::AnimatableProperty< Vector4 >::Set().

Referenced by Dali::Internal::SceneGraph::SetClearColorMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetClearEnabled ( bool  enabled)

Set whether the render-task will clear the results of previous render-tasks.

The default is false.

.0

Parameters
[in]enabledTrue if the render-task should clear.
Note
The default GL surface is cleared automatically at the beginning of each frame; this setting is only useful when 2+ render-tasks are used, and the result of the first task needs to be (partially) cleared before rendering the second.

Definition at line 168 of file scene-graph-render-task.cpp.

References mClearEnabled.

Referenced by Dali::Internal::SceneGraph::SetClearEnabledMessage().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetCullMode ( bool  mode)

Set whether the render task will cull the actors to the camera's view frustum.

Note that this will only affect image actors that use the default vertex shader. The default mode is to cull actors. .0

Parameters
[in]cullModeTrue if the renderers should be culled.

Definition at line 178 of file scene-graph-render-task.cpp.

References mCullMode.

Referenced by Dali::Internal::SceneGraph::SetCullModeMessage().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetExclusive ( bool  exclusive)

Set whether the RenderTask has exclusive access to the source nodes.

Parameters
[in]exclusiveTrue if the source nodes will only be rendered by this render-task.

Definition at line 88 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::Node::GetExclusiveRenderTask(), mExclusive, mSourceNode, and Dali::Internal::SceneGraph::Node::SetExclusiveRenderTask().

Referenced by Dali::Internal::SceneGraph::SetExclusiveMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetFrameBufferId ( unsigned int  resourceId,
bool  isNativeFBO 
)

Set the frame-buffer used as a render target.

Parameters
[in]resourceIdThe resource ID of the frame-buffer, or zero if not rendering off-screen.
[in]isNativeFBOif this render task is targeting a native FBO

Definition at line 126 of file scene-graph-render-task.cpp.

References mFrameBufferResourceId, and mTargetIsNativeFramebuffer.

Referenced by Dali::Internal::SceneGraph::SetFrameBufferIdMessage().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetRefreshRate ( unsigned int  refreshRate)

Set the refresh-rate of the RenderTask.

Parameters
[in]refreshRateThe new refresh rate.

Definition at line 188 of file scene-graph-render-task.cpp.

References DALI_LOG_TRACE_METHOD_FMT, mFrameBufferResourceId, mFrameCounter, mNotifyTrigger, mRefreshRate, mResourceManager, mState, mWaitingToRender, RENDER_CONTINUOUSLY, RENDER_ONCE_WAITING_FOR_RESOURCES, and Dali::Internal::ResourceManager::SetFrameBufferBeenRenderedTo().

Referenced by Dali::Internal::SceneGraph::SetRefreshRateMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetResourcesFinished ( bool  resourcesFinished)

Set whether all resources were available when the render-task was processed.

Parameters
[in]resourcesCompleteTrue if the resources of the source tree are completely loaded.

Definition at line 273 of file scene-graph-render-task.cpp.

References mFrameBufferResourceId, mResourceManager, mResourcesFinished, and Dali::Internal::ResourceManager::SetFrameBufferBeenRenderedTo().

Referenced by Dali::Internal::SceneGraph::ProcessRenderTasks().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetSourceNode ( Node node)

Set the nodes to be rendered.

Parameters
[in]nodeThis node and its children will be rendered.

Definition at line 66 of file scene-graph-render-task.cpp.

References Dali::Internal::SceneGraph::Node::GetExclusiveRenderTask(), mExclusive, mSourceNode, and Dali::Internal::SceneGraph::Node::SetExclusiveRenderTask().

Referenced by Dali::Internal::SceneGraph::SetSourceNodeMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetViewportPosition ( BufferIndex  updateBufferIndex,
const Vector2 value 
)

Set the value of property viewportPosition This value will persist only for the current frame.

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]valueThe value of the property

Definition at line 449 of file scene-graph-render-task.cpp.

References mViewportPosition, and Dali::Internal::SceneGraph::AnimatableProperty< Vector2 >::Set().

Here is the call graph for this function:

void Dali::Internal::SceneGraph::RenderTask::SetViewportSize ( BufferIndex  updateBufferIndex,
const Vector2 value 
)

Set the value of property viewportSize This value will persist only for the current frame.

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]valueThe value of the property

Definition at line 464 of file scene-graph-render-task.cpp.

References mViewportSize, and Dali::Internal::SceneGraph::AnimatableProperty< Vector2 >::Set().

Here is the call graph for this function:

void Dali::Internal::SceneGraph::RenderTask::UpdateState ( )

Process a frame.

This method is called each frame for every ready render task, regardless of whether it needs to render (so that the frame counter can be updated).

Definition at line 285 of file scene-graph-render-task.cpp.

References Dali::Internal::ResourceManager::HasFrameBufferBeenRenderedTo(), Dali::Internal::Render::RenderTracker::IsSynced(), mFrameBufferResourceId, mFrameCounter, mNotifyTrigger, mRefreshRate, mRenderSyncTracker, mResourceManager, mResourcesFinished, mState, mTargetIsNativeFramebuffer, mWaitingToRender, Dali::RenderTask::REFRESH_ALWAYS, RENDER_CONTINUOUSLY, RENDER_ONCE_WAITING_FOR_RESOURCES, RENDERED_ONCE, and TASK_LOG_FMT.

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderTask::ViewMatrixUpdated ( )
Returns
true if the view matrix has been updated during this or last frame

Definition at line 439 of file scene-graph-render-task.cpp.

References mCameraAttachment, and Dali::Internal::SceneGraph::CameraAttachment::ViewMatrixUpdated().

Referenced by Dali::Internal::SceneGraph::PrepareRenderInstruction().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

CameraAttachment* Dali::Internal::SceneGraph::RenderTask::mCameraAttachment
private
Node* Dali::Internal::SceneGraph::RenderTask::mCameraNode
private

Definition at line 363 of file scene-graph-render-task.h.

Referenced by GetCamera(), ReadyToRender(), and SetCameraNode().

AnimatableProperty< Vector4 > Dali::Internal::SceneGraph::RenderTask::mClearColor
bool Dali::Internal::SceneGraph::RenderTask::mClearEnabled
private

Whether previous results are cleared.

Definition at line 371 of file scene-graph-render-task.h.

Referenced by GetClearEnabled(), PrepareRenderInstruction(), and SetClearEnabled().

bool Dali::Internal::SceneGraph::RenderTask::mCullMode
private

Whether renderers should be frustum culled.

Definition at line 372 of file scene-graph-render-task.h.

Referenced by GetCullMode(), and SetCullMode().

bool Dali::Internal::SceneGraph::RenderTask::mExclusive
private

Whether the render task has exclusive access to the source actor (node in the scene graph implementation).

Definition at line 370 of file scene-graph-render-task.h.

Referenced by IsExclusive(), SetExclusive(), SetSourceNode(), and ~RenderTask().

unsigned int Dali::Internal::SceneGraph::RenderTask::mFrameBufferResourceId
private
unsigned int Dali::Internal::SceneGraph::RenderTask::mFrameCounter
private

counter for rendering every N frames

Definition at line 379 of file scene-graph-render-task.h.

Referenced by IsRenderRequired(), ReadyToRender(), SetRefreshRate(), and UpdateState().

bool Dali::Internal::SceneGraph::RenderTask::mNotifyTrigger
private

True if a render once render task has finished renderering.

Definition at line 369 of file scene-graph-render-task.h.

Referenced by HasRendered(), SetRefreshRate(), and UpdateState().

unsigned int Dali::Internal::SceneGraph::RenderTask::mRefreshRate
private

REFRESH_ONCE, REFRESH_ALWAYS or render every N frames.

Definition at line 378 of file scene-graph-render-task.h.

Referenced by GetRefreshRate(), PrepareRenderInstruction(), SetRefreshRate(), and UpdateState().

unsigned int Dali::Internal::SceneGraph::RenderTask::mRenderedOnceCounter
private

Incremented whenever state changes to RENDERED_ONCE_AND_NOTIFIED.

Definition at line 381 of file scene-graph-render-task.h.

Referenced by GetRenderedOnceCounter(), and HasRendered().

RenderMessageDispatcher* Dali::Internal::SceneGraph::RenderTask::mRenderMessageDispatcher
private

Definition at line 359 of file scene-graph-render-task.h.

Referenced by Initialize(), PrepareRenderInstruction(), and ~RenderTask().

Render::RenderTracker* Dali::Internal::SceneGraph::RenderTask::mRenderSyncTracker
private

Definition at line 361 of file scene-graph-render-task.h.

Referenced by PrepareRenderInstruction(), UpdateState(), and ~RenderTask().

FrameBufferTexture* Dali::Internal::SceneGraph::RenderTask::mRenderTarget
private

Definition at line 374 of file scene-graph-render-task.h.

ResourceManager* Dali::Internal::SceneGraph::RenderTask::mResourceManager
private
bool Dali::Internal::SceneGraph::RenderTask::mResourcesFinished
private

True if all resources were available when the render-task was processed.

Definition at line 367 of file scene-graph-render-task.h.

Referenced by PrepareRenderInstruction(), SetResourcesFinished(), and UpdateState().

Node* Dali::Internal::SceneGraph::RenderTask::mSourceNode
private
State Dali::Internal::SceneGraph::RenderTask::mState
private
bool Dali::Internal::SceneGraph::RenderTask::mTargetIsNativeFramebuffer
private

Tells if our target is a native framebuffer.

Definition at line 382 of file scene-graph-render-task.h.

Referenced by PrepareRenderInstruction(), SetFrameBufferId(), and UpdateState().

Viewport Dali::Internal::SceneGraph::RenderTask::mViewport
private

Definition at line 375 of file scene-graph-render-task.h.

AnimatableProperty< Vector2 > Dali::Internal::SceneGraph::RenderTask::mViewportPosition
AnimatableProperty< Vector2 > Dali::Internal::SceneGraph::RenderTask::mViewportSize
bool Dali::Internal::SceneGraph::RenderTask::mWaitingToRender
private

True when an render once to FBO is waiting.

Definition at line 368 of file scene-graph-render-task.h.

Referenced by IsWaitingToRender(), SetRefreshRate(), and UpdateState().


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