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

#include <render-task-impl.h>

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

Classes

class  Connector
 Helper class for connecting Nodes to the scene-graph RenderTask. More...
 

Public Types

typedef
Dali::RenderTask::ScreenToFrameBufferFunction 
ScreenToFrameBufferFunction
 
- Public Types inherited from Dali::Internal::Object
typedef Dali::Handle::Capability Capability
 

Public Member Functions

void SetSourceActor (Actor *actor)
 Set the actors to be rendered. More...
 
ActorGetSourceActor () const
 Retrieve the actors to be rendered. More...
 
void SetExclusive (bool exclusive)
 Set whether the RenderTask has exclusive access to the source actors; the default is false. More...
 
bool IsExclusive () const
 Query whether the RenderTask has exclusive access to the source actors. More...
 
void SetInputEnabled (bool enabled)
 Set whether the render-task should be considered for input handling; the default is true. More...
 
bool GetInputEnabled () const
 Query whether the render-task should be considered for input handling. More...
 
void SetCameraActor (CameraActor *cameraActor)
 Set the actor from which the scene is viewed. More...
 
CameraActorGetCameraActor () const
 Retrieve the actor from which the scene is viewed. More...
 
void SetTargetFrameBuffer (Dali::FrameBufferImage frameBuffer)
 Set the frame-buffer used as a render target. More...
 
Dali::FrameBufferImage GetTargetFrameBuffer () const
 Retrieve the frame-buffer used as a render target. More...
 
void SetScreenToFrameBufferFunction (ScreenToFrameBufferFunction conversionFunction)
 Set the function used to convert screen coordinates to frame-buffer coordinates. More...
 
ScreenToFrameBufferFunction GetScreenToFrameBufferFunction () const
 Retrieve the function used to convert screen coordinates to frame-buffer coordinates. More...
 
void SetScreenToFrameBufferMappingActor (Actor *mappingActor)
 copydoc Dali::RenderTask::SetScreenToFrameBufferMappingActor More...
 
ActorGetScreenToFrameBufferMappingActor () const
 copydoc Dali::RenderTask::GetScreenToFrameBufferMAppingActor More...
 
void SetViewportPosition (const Vector2 &value)
 Set the GL viewport position used when rendering. More...
 
Vector2 GetCurrentViewportPosition () const
 Retrieve the GL viewport position used when rendering. More...
 
void SetViewportSize (const Vector2 &value)
 Set the GL viewport size used when rendering. More...
 
Vector2 GetCurrentViewportSize () const
 Retrieve the GL viewport size used when rendering. More...
 
void SetViewport (const Viewport &viewport)
 Set the GL viewport used when rendering. More...
 
void GetViewport (Viewport &viewPort) const
 
void SetClearColor (const Vector4 &color)
 Set the clear color used when SetClearEnabled(true) is used. More...
 
const Vector4GetClearColor () const
 Retrieve the clear color used when SetClearEnabled(true) is used. 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
 Query the refresh-rate of the RenderTask. More...
 
bool IsHittable (Vector2 &screenCoords) const
 Check if the render-task is hittable. More...
 
bool TranslateCoordinates (Vector2 &screenCoords) const
 Translates screen coordinates to render task coordinates for offscreen render tasks. More...
 
bool IsSystemLevel () const
 Query whether the RenderTask is on the system level render-task list. More...
 
bool WorldToViewport (const Vector3 &position, float &viewportX, float &viewportY) const
  More...
 
bool ViewportToLocal (Actor *actor, float viewportX, float viewportY, float &localX, float &localY) const
  More...
 
SceneGraph::RenderTaskCreateSceneObject ()
 Create the scene-graph RenderTask object. More...
 
SceneGraph::RenderTaskGetRenderTaskSceneObject ()
 Retrieve the scene-graph RenderTask object. More...
 
void DiscardSceneObject ()
 Discard the scene-graph RenderTask object. More...
 
virtual unsigned int GetDefaultPropertyCount () const
 Query how many default properties the derived class supports. More...
 
virtual void GetDefaultPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the indices that are associated with the default properties supported by the derived class. More...
 
virtual const char * GetDefaultPropertyName (Property::Index index) const
 Query how many default properties the derived class supports. More...
 
virtual Property::Index GetDefaultPropertyIndex (const std::string &name) const
 Query the index of a default property. More...
 
virtual bool IsDefaultPropertyWritable (Property::Index index) const
 Query whether a default property is writable. More...
 
virtual bool IsDefaultPropertyAnimatable (Property::Index index) const
 Query whether a default property is animatable. More...
 
virtual bool IsDefaultPropertyAConstraintInput (Property::Index index) const
 Query whether a default property can be used as an input to a constraint. More...
 
virtual Property::Type GetDefaultPropertyType (Property::Index index) const
 Query the type of a default property. More...
 
virtual void SetDefaultProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of a default property. More...
 
virtual Property::Value GetDefaultProperty (Property::Index index) const
 Retrieve a default property value. More...
 
virtual const
SceneGraph::PropertyOwner
GetSceneObject () const
 Retrieve the scene-graph object added by this object. More...
 
virtual const
SceneGraph::PropertyBase
GetSceneObjectAnimatableProperty (Property::Index index) const
 Retrieve an animatable property owned by the scene-graph object. More...
 
virtual const PropertyInputImplGetSceneObjectInputProperty (Property::Index index) const
 Retrieve a constraint input-property owned by the scene-graph object. More...
 
bool HasFinished ()
 Query whether a Finished signal should be emitted for this render-task. More...
 
void EmitSignalFinish ()
 Emit the Finished signal. More...
 
Dali::RenderTask::RenderTaskSignalTypeFinishedSignal ()
 If the refresh rate is REFRESH_ONCE, connect to this signal to be notified when a RenderTask has finished. More...
 
- Public Member Functions inherited from Dali::Internal::Object
 Object ()
 Constructor. More...
 
virtual void AddObserver (Observer &observer)
 Add an observer to the object. More...
 
virtual void RemoveObserver (Observer &observer)
 Remove an observer from the object. More...
 
virtual bool Supports (Capability capability) const
 Query whether an handle supports a given capability. More...
 
virtual unsigned int GetPropertyCount () const
 Query how many properties are provided by an handle. More...
 
virtual std::string GetPropertyName (Property::Index index) const
 Query the name of a property. More...
 
virtual Property::Index GetPropertyIndex (const std::string &name) const
 Query the index of a property. More...
 
virtual bool IsPropertyWritable (Property::Index index) const
 Query whether a property can be set using SetProperty(). More...
 
virtual bool IsPropertyAnimatable (Property::Index index) const
 Query whether a writable property can be the target of an animation or constraint. More...
 
virtual bool IsPropertyAConstraintInput (Property::Index index) const
 Query whether a property can be used as in input to a constraint. More...
 
virtual Property::Type GetPropertyType (Property::Index index) const
 Query the type of a property. More...
 
virtual void SetProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of an existing property. More...
 
virtual Property::Value GetProperty (Property::Index index) const
 Retrieve a property value. More...
 
virtual void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this object (including custom properties). More...
 
virtual Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue)
 Register a new animatable property. More...
 
virtual Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue, Property::AccessMode accessMode)
  More...
 
virtual Dali::PropertyNotification AddPropertyNotification (Property::Index index, int componentIndex, const Dali::PropertyCondition &condition)
 Add a property notification to this object. More...
 
virtual void RemovePropertyNotification (Dali::PropertyNotification propertyNotification)
 Remove a property notification from this object. More...
 
virtual void RemovePropertyNotifications ()
 Remove all property notifications from this object. More...
 
void AddUniformMapping (Property::Index propertyIndex, const std::string &uniformName) const
  More...
 
void RemoveUniformMapping (const std::string &uniformName)
  More...
 
void ApplyConstraint (ConstraintBase &constraint)
 Apply a constraint to an Object. More...
 
void RemoveConstraint (ConstraintBase &constraint)
 Remove one constraint from an Object. More...
 
void RemoveConstraints ()
 Remove all constraints from a Object. More...
 
void RemoveConstraints (unsigned int tag)
 Remove all constraints from a Object with a matching tag. More...
 
void SetTypeInfo (const TypeInfo *typeInfo)
 Called by TypeInfo to set the type-info that this object-impl is created by. More...
 
unsigned int CustomPropertyStartIndex ()
 
virtual int GetPropertyComponentIndex (Property::Index index) const
 Query whether the property is a component of a scene-graph property. More...
 
- Public Member Functions inherited from Dali::BaseObject
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
bool DoConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, FunctorDelegate *functorDelegate)
 Not intended for application developers. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static RenderTaskNew (bool isSystemLevel)
 Creates a new RenderTask. More...
 
static bool DoConnectSignal (BaseObject *object, ConnectionTrackerInterface *tracker, const std::string &signalName, FunctorDelegate *functor)
 Connects a callback function with the object's signals. More...
 

Protected Member Functions

 RenderTask (bool isSystemLevel)
 Construct a new RenderTask. More...
 
virtual ~RenderTask ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::Internal::Object
virtual ~Object ()
 A reference counted object may only be deleted by calling Unreference() More...
 
void OnSceneObjectAdd ()
 Called immediately by derived classes, after the scene-object has been created & passed to the scene-graph. More...
 
void OnSceneObjectRemove ()
 Called by derived classes, shortly before send a message to remove the scene-object. More...
 
virtual void OnPropertySet (Property::Index index, Property::Value propertyValue)
 For use in derived classes. More...
 
const TypeInfoGetTypeInfo () const
 Retrieves the TypeInfo for this object. More...
 
CustomPropertyMetadataFindCustomProperty (Property::Index index) const
 Helper to find custom property. More...
 
AnimatablePropertyMetadataFindAnimatableProperty (Property::Index index) const
 Helper to find animatable property. More...
 
Property::Index RegisterSceneGraphProperty (const std::string &name, Property::Index index, const Property::Value &propertyValue) const
 Helper to register a scene-graph property. More...
 
AnimatablePropertyMetadataRegisterAnimatableProperty (Property::Index index) const
 Check whether the animatable property is registered already, if not then register one. More...
 
EventThreadServicesGetEventThreadServices ()
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread. More...
 
const EventThreadServicesGetEventThreadServices () const
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread This is intentionally inline for performance reasons. More...
 
- Protected Member Functions inherited from Dali::BaseObject
 BaseObject ()
 Default constructor. More...
 
virtual ~BaseObject ()
 A reference counted object may only be deleted by calling Unreference(). More...
 
void RegisterObject ()
 Registers the object as created with the Object registry. More...
 
void UnregisterObject ()
 Unregisters the object from Object registry. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Private Attributes

SceneGraph::RenderTaskmSceneObject
 Raw-pointer to the scene-graph object; not owned. More...
 
Connector mSourceConnector
 Responsible for connecting/disconnecting source Nodes. More...
 
Connector mCameraConnector
 Responsible for connecting/disconnecting camera Nodes. More...
 
Connector mMappingConnector
 
Vector4 mClearColor
 Responsible for connecting/disconnection actor node, which used to mapping screen to frame buffer coordinate. More...
 
unsigned int mRefreshRate
 Determines how often the task is processed. More...
 
unsigned int mRefreshOnceCounter
 
Dali::FrameBufferImage mFrameBufferImage
 Optional off-screen render target. More...
 
Dali::RenderTask::ScreenToFrameBufferFunction mScreenToFrameBufferFunction
 Used to convert screen to frame-buffer coordinates. More...
 
bool mExclusive: 1
 True if the render-task has exclusive access to the source Nodes. More...
 
bool mInputEnabled: 1
 True if the render-task should be considered for input handling. More...
 
bool mClearEnabled: 1
 True if the render-task should be clear the color buffer. More...
 
bool mCullMode: 1
 True if the render-task's actors should be culled. More...
 
bool mIsSystemLevel: 1
 True if the render-task is on the system level task list. More...
 
Dali::RenderTask::RenderTaskSignalType mSignalFinished
 Signal emmited when the render task has been processed. More...
 

Detailed Description

Definition at line 42 of file render-task-impl.h.

Member Typedef Documentation

typedef Dali::RenderTask::ScreenToFrameBufferFunction Dali::Internal::RenderTask::ScreenToFrameBufferFunction

Definition at line 46 of file render-task-impl.h.

Constructor & Destructor Documentation

Dali::Internal::RenderTask::RenderTask ( bool  isSystemLevel)
protected

Construct a new RenderTask.

Parameters
[in]isSystemLevelWhether the RenderTask is on the system level task list.

Definition at line 750 of file render-task-impl.cpp.

References DALI_LOG_INFO.

Dali::Internal::RenderTask::~RenderTask ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 768 of file render-task-impl.cpp.

References DALI_LOG_INFO.

Member Function Documentation

SceneGraph::RenderTask * Dali::Internal::RenderTask::CreateSceneObject ( )
void Dali::Internal::RenderTask::DiscardSceneObject ( )

Discard the scene-graph RenderTask object.

Definition at line 491 of file render-task-impl.cpp.

References Dali::GetImplementation(), mFrameBufferImage, and mSceneObject.

Referenced by Dali::Internal::RenderTaskList::RemoveTask().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::RenderTask::DoConnectSignal ( BaseObject object,
ConnectionTrackerInterface tracker,
const std::string &  signalName,
FunctorDelegate functor 
)
static

Connects a callback function with the object's signals.

Parameters
[in]objectThe object providing the signal.
[in]trackerUsed to disconnect the signal.
[in]signalNameThe signal to connect to.
[in]functorA newly allocated FunctorDelegate.
Returns
True if the signal was connected.
Postcondition
If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.

Definition at line 732 of file render-task-impl.cpp.

References FinishedSignal(), and Dali::Internal::anonymous_namespace{animation-impl.cpp}::SIGNAL_FINISHED.

Here is the call graph for this function:

void Dali::Internal::RenderTask::EmitSignalFinish ( )

Emit the Finished signal.

Definition at line 716 of file render-task-impl.cpp.

References DALI_LOG_INFO, and mSignalFinished.

Dali::RenderTask::RenderTaskSignalType & Dali::Internal::RenderTask::FinishedSignal ( )

If the refresh rate is REFRESH_ONCE, connect to this signal to be notified when a RenderTask has finished.

.0

Definition at line 727 of file render-task-impl.cpp.

References mSignalFinished.

Referenced by DoConnectSignal().

Here is the caller graph for this function:

CameraActor * Dali::Internal::RenderTask::GetCameraActor ( ) const
const Vector4 & Dali::Internal::RenderTask::GetClearColor ( ) const

Retrieve the clear color used when SetClearEnabled(true) is used.

.0

Returns
The clear color.
Note
This property can be animated; the return value may not match the value written with SetClearColor().

Definition at line 277 of file render-task-impl.cpp.

References Dali::Internal::SceneGraph::RenderTask::GetClearColor(), Dali::Internal::Object::GetEventThreadServices(), and mSceneObject.

Referenced by GetDefaultProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::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 296 of file render-task-impl.cpp.

References mClearEnabled.

bool Dali::Internal::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 315 of file render-task-impl.cpp.

References mCullMode.

Vector2 Dali::Internal::RenderTask::GetCurrentViewportPosition ( ) const

Retrieve the GL viewport position used when rendering.

.0

Returns
The viewport.

Definition at line 207 of file render-task-impl.cpp.

References Dali::Internal::Object::GetEventThreadServices(), Dali::Internal::SceneGraph::RenderTask::GetViewportPosition(), and mSceneObject.

Referenced by GetDefaultProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector2 Dali::Internal::RenderTask::GetCurrentViewportSize ( ) const

Retrieve the GL viewport size used when rendering.

.0

Returns
The viewport.

Definition at line 217 of file render-task-impl.cpp.

References Dali::Internal::Object::GetEventThreadServices(), Dali::Internal::SceneGraph::RenderTask::GetViewportSize(), and mSceneObject.

Referenced by GetDefaultProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

Property::Value Dali::Internal::RenderTask::GetDefaultProperty ( Property::Index  index) const
virtual

Retrieve a default property value.

Parameters
[in]indexThe index of the property.
Returns
The property value.

Implements Dali::Internal::Object.

Definition at line 604 of file render-task-impl.cpp.

References Dali::RenderTask::Property::CLEAR_COLOR, DALI_ASSERT_ALWAYS, GetClearColor(), GetCurrentViewportPosition(), GetCurrentViewportSize(), Dali::Property::Value(), Dali::RenderTask::Property::VIEWPORT_POSITION, and Dali::RenderTask::Property::VIEWPORT_SIZE.

Here is the call graph for this function:

unsigned int Dali::Internal::RenderTask::GetDefaultPropertyCount ( ) const
virtual

Query how many default properties the derived class supports.

Returns
The number of default properties.

Implements Dali::Internal::Object.

Definition at line 507 of file render-task-impl.cpp.

Property::Index Dali::Internal::RenderTask::GetDefaultPropertyIndex ( const std::string &  name) const
virtual

Query the index of a default property.

Parameters
[in]nameThe name of the property.
Returns
The index of the property, or Property::INVALID_INDEX if no default property exists with the given name.

Implements Dali::Internal::Object.

Definition at line 534 of file render-task-impl.cpp.

References Dali::Property::INVALID_INDEX.

void Dali::Internal::RenderTask::GetDefaultPropertyIndices ( Property::IndexContainer indices) const
virtual

Retrieve all the indices that are associated with the default properties supported by the derived class.

Returns
A container of default property indices.
Note
The deriving class must not modify the existing elements in the container.

Implements Dali::Internal::Object.

Definition at line 512 of file render-task-impl.cpp.

References Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Vector< T, IsTrivialType >::Reserve().

Here is the call graph for this function:

const char * Dali::Internal::RenderTask::GetDefaultPropertyName ( Property::Index  index) const
virtual

Query how many default properties the derived class supports.

Returns
The number of default properties.

Implements Dali::Internal::Object.

Definition at line 522 of file render-task-impl.cpp.

Property::Type Dali::Internal::RenderTask::GetDefaultPropertyType ( Property::Index  index) const
virtual

Query the type of a default property.

Parameters
[in]indexThe index of the property.
Returns
The type of the property.

Implements Dali::Internal::Object.

Definition at line 566 of file render-task-impl.cpp.

References Dali::Property::NONE.

bool Dali::Internal::RenderTask::GetInputEnabled ( ) const

Query whether the render-task should be considered for input handling.

.0

Returns
True if the render-task should be considered for input handling.

Definition at line 125 of file render-task-impl.cpp.

References mInputEnabled.

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

Query the refresh-rate of the RenderTask.

.0

Returns
The refresh-rate.

Definition at line 336 of file render-task-impl.cpp.

References mRefreshRate.

SceneGraph::RenderTask * Dali::Internal::RenderTask::GetRenderTaskSceneObject ( )

Retrieve the scene-graph RenderTask object.

Returns
The scene-graph object, or NULL if this has been discarded.

Definition at line 486 of file render-task-impl.cpp.

References mSceneObject.

Referenced by Dali::Internal::RenderTaskList::RemoveTask().

Here is the caller graph for this function:

const SceneGraph::PropertyOwner * Dali::Internal::RenderTask::GetSceneObject ( ) const
virtual

Retrieve the scene-graph object added by this object.

Returns
A pointer to the object, or NULL if no object has been added to the scene-graph.

Implements Dali::Internal::Object.

Definition at line 637 of file render-task-impl.cpp.

References mSceneObject.

const SceneGraph::PropertyBase * Dali::Internal::RenderTask::GetSceneObjectAnimatableProperty ( Property::Index  index) const
virtual

Retrieve an animatable property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to a property, or NULL if a scene-object does not exist with this property.

Implements Dali::Internal::Object.

Definition at line 642 of file render-task-impl.cpp.

References Dali::RenderTask::Property::CLEAR_COLOR, DALI_ASSERT_ALWAYS, Dali::Internal::Object::IsPropertyAnimatable(), Dali::Internal::SceneGraph::RenderTask::mClearColor, mSceneObject, Dali::Internal::SceneGraph::RenderTask::mViewportPosition, Dali::Internal::SceneGraph::RenderTask::mViewportSize, Dali::RenderTask::Property::VIEWPORT_POSITION, and Dali::RenderTask::Property::VIEWPORT_SIZE.

Here is the call graph for this function:

const PropertyInputImpl * Dali::Internal::RenderTask::GetSceneObjectInputProperty ( Property::Index  index) const
virtual

Retrieve a constraint input-property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to an input property, or NULL if a scene-object does not exist with this property.

Implements Dali::Internal::Object.

Definition at line 673 of file render-task-impl.cpp.

References Dali::RenderTask::Property::CLEAR_COLOR, mSceneObject, Dali::Internal::SceneGraph::RenderTask::mViewportPosition, Dali::Internal::SceneGraph::RenderTask::mViewportSize, Dali::RenderTask::Property::VIEWPORT_POSITION, and Dali::RenderTask::Property::VIEWPORT_SIZE.

RenderTask::ScreenToFrameBufferFunction Dali::Internal::RenderTask::GetScreenToFrameBufferFunction ( ) const

Retrieve the function used to convert screen coordinates to frame-buffer coordinates.

.0

Returns
The conversion function.

Definition at line 187 of file render-task-impl.cpp.

References mScreenToFrameBufferFunction.

Actor * Dali::Internal::RenderTask::GetScreenToFrameBufferMappingActor ( ) const

copydoc Dali::RenderTask::GetScreenToFrameBufferMAppingActor

Definition at line 197 of file render-task-impl.cpp.

References Dali::Internal::RenderTask::Connector::mActor, and mMappingConnector.

Actor * Dali::Internal::RenderTask::GetSourceActor ( ) const

Retrieve the actors to be rendered.

.0

Returns
This actor and its children will be rendered.

Definition at line 90 of file render-task-impl.cpp.

References Dali::Internal::RenderTask::Connector::mActor, and mSourceConnector.

Referenced by Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestRenderTask(), IsHittable(), and Dali::Internal::RenderTaskList::SetExclusive().

Here is the caller graph for this function:

Dali::FrameBufferImage Dali::Internal::RenderTask::GetTargetFrameBuffer ( ) const

Retrieve the frame-buffer used as a render target.

.0

Returns
A valid frame-buffer handle, or an uninitialised handle if off-screen rendering is disabled.

Definition at line 177 of file render-task-impl.cpp.

References mFrameBufferImage.

Referenced by Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestForEachRenderTask().

Here is the caller graph for this function:

void Dali::Internal::RenderTask::GetViewport ( Viewport viewPort) const
bool Dali::Internal::RenderTask::HasFinished ( )

Query whether a Finished signal should be emitted for this render-task.

This should only be called by NotificationManager, before signals are emitted.

Precondition
The refresh rate must be REFRESH_ONCE.
Postcondition
HasFinished() will return false on subsequent calls, until the render-task is processed again.
Returns
true if the refresh once render task has finished. Otherwise it returns false.

Definition at line 700 of file render-task-impl.cpp.

References DALI_LOG_INFO, Dali::Internal::SceneGraph::RenderTask::GetRenderedOnceCounter(), mRefreshOnceCounter, and mSceneObject.

Here is the call graph for this function:

bool Dali::Internal::RenderTask::IsDefaultPropertyAConstraintInput ( Property::Index  index) const
virtual

Query whether a default property can be used as an input to a constraint.

Parameters
[in]indexThe index of the property.
Returns
True if the property can be used as an input to a constraint.

Implements Dali::Internal::Object.

Definition at line 561 of file render-task-impl.cpp.

bool Dali::Internal::RenderTask::IsDefaultPropertyAnimatable ( Property::Index  index) const
virtual

Query whether a default property is animatable.

This determines whether the property can be the target of an animation or constraint.

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Implements Dali::Internal::Object.

Definition at line 556 of file render-task-impl.cpp.

bool Dali::Internal::RenderTask::IsDefaultPropertyWritable ( Property::Index  index) const
virtual

Query whether a default property is writable.

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Implements Dali::Internal::Object.

Definition at line 551 of file render-task-impl.cpp.

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

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

.0

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

Definition at line 115 of file render-task-impl.cpp.

References mExclusive.

bool Dali::Internal::RenderTask::IsHittable ( Vector2 screenCoords) const

Check if the render-task is hittable.

If render task is offscreen, the screen coordinates may be translated.

Parameters
[in,out]screenCoordsThe screen coordinate, which may be converted (for hit-testing actors which are rendered off-screen).
Returns
True the render-task can be used for input-handling; otherwise the output parameters are not valid.

Definition at line 341 of file render-task-impl.cpp.

References GetCameraActor(), GetSourceActor(), mInputEnabled, Dali::Internal::Actor::OnStage(), and TranslateCoordinates().

Referenced by Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestRenderTask().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::RenderTask::IsSystemLevel ( ) const

Query whether the RenderTask is on the system level render-task list.

Returns
true, if on the system level task list, false otherwise.

Definition at line 414 of file render-task-impl.cpp.

References mIsSystemLevel.

RenderTask * Dali::Internal::RenderTask::New ( bool  isSystemLevel)
static

Creates a new RenderTask.

Parameters
[in]isSystemLevelWhether the render-task is on the system level task list.

Definition at line 73 of file render-task-impl.cpp.

Referenced by Dali::Internal::RenderTaskList::CreateTask().

Here is the caller graph for this function:

void Dali::Internal::RenderTask::SetCameraActor ( CameraActor cameraActor)

Set the actor from which the scene is viewed.

.0

Parameters
[in]cameraActorThe scene is viewed from the perspective of this actor.

Definition at line 130 of file render-task-impl.cpp.

References mCameraConnector, and Dali::Internal::RenderTask::Connector::SetActor().

Referenced by Dali::Internal::RenderTaskList::CreateTask().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::RenderTask::SetClearColor ( const Vector4 color)

Set the clear color used when SetClearEnabled(true) is used.

.0

Parameters
[in]colorThe new clear color.

Definition at line 263 of file render-task-impl.cpp.

References Dali::Internal::SceneGraph::BakeClearColorMessage(), Dali::Internal::Object::GetEventThreadServices(), mClearColor, and mSceneObject.

Referenced by SetDefaultProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::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 282 of file render-task-impl.cpp.

References Dali::Internal::Object::GetEventThreadServices(), mClearEnabled, mSceneObject, and Dali::Internal::SceneGraph::SetClearEnabledMessage().

Here is the call graph for this function:

void Dali::Internal::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 301 of file render-task-impl.cpp.

References Dali::Internal::Object::GetEventThreadServices(), mCullMode, mSceneObject, and Dali::Internal::SceneGraph::SetCullModeMessage().

Here is the call graph for this function:

void Dali::Internal::RenderTask::SetDefaultProperty ( Property::Index  index,
const Property::Value propertyValue 
)
virtual

Set the value of a default property.

Precondition
The property types match i.e. propertyValue.GetType() is equal to GetPropertyType(index).
Parameters
[in]indexThe index of the property.
[in]propertyValueThe new value of the property.

Implements Dali::Internal::Object.

Definition at line 577 of file render-task-impl.cpp.

References Dali::RenderTask::Property::CLEAR_COLOR, SetClearColor(), SetViewportPosition(), SetViewportSize(), Dali::RenderTask::Property::VIEWPORT_POSITION, and Dali::RenderTask::Property::VIEWPORT_SIZE.

Here is the call graph for this function:

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

Set whether the RenderTask has exclusive access to the source actors; the default is false.

.0

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

Definition at line 95 of file render-task-impl.cpp.

References Dali::Internal::Stage::GetCurrent(), Dali::Internal::Object::GetEventThreadServices(), Dali::Internal::Stage::GetRenderTaskList(), mExclusive, mSceneObject, Dali::Internal::RenderTaskList::SetExclusive(), and Dali::Internal::SceneGraph::SetExclusiveMessage().

Here is the call graph for this function:

void Dali::Internal::RenderTask::SetInputEnabled ( bool  enabled)

Set whether the render-task should be considered for input handling; the default is true.

The task used for input handling will be last task in the RenderTaskList which has input enabled, and has a valid source & camera actor. A RenderTask targetting a frame-buffer can still be hit-tested, provided that the screen->frame-buffer coordinate conversion is successful; see also SetScreenToFrameBufferFunction(). .0

Parameters
[in]enabledTrue if the render-task should be considered for input handling.

Definition at line 120 of file render-task-impl.cpp.

References mInputEnabled.

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

Set the refresh-rate of the RenderTask.

The default is REFRESH_ALWAYS (1), meaning that the RenderTask will be processed every frame if the scene graph is changing. It may be desirable to process less frequently. For example, SetRefreshRate(3) will process once every 3 frames if the scene graph is changing. If the scene graph is not changing, then the render task will not be rendered, regardless of this value.

The REFRESH_ONCE value means that the RenderTask will be processed once only, to take a snap-shot of the scene. Repeatedly calling SetRefreshRate(REFRESH_ONCE) will cause more snap-shots to be taken.

.0

Parameters
[in]refreshRateThe new refresh rate.

Definition at line 320 of file render-task-impl.cpp.

References DALI_LOG_INFO, DALI_LOG_TRACE_METHOD_FMT, Dali::Internal::Object::GetEventThreadServices(), mRefreshRate, mSceneObject, and Dali::Internal::SceneGraph::SetRefreshRateMessage().

Here is the call graph for this function:

void Dali::Internal::RenderTask::SetScreenToFrameBufferFunction ( ScreenToFrameBufferFunction  conversionFunction)

Set the function used to convert screen coordinates to frame-buffer coordinates.

This is useful for hit-testing actors which are rendered off-screen. .0

Parameters
[in]conversionFunctionThe conversion function.

Definition at line 182 of file render-task-impl.cpp.

References mScreenToFrameBufferFunction.

void Dali::Internal::RenderTask::SetScreenToFrameBufferMappingActor ( Actor mappingActor)

copydoc Dali::RenderTask::SetScreenToFrameBufferMappingActor

Definition at line 192 of file render-task-impl.cpp.

References mMappingConnector, and Dali::Internal::RenderTask::Connector::SetActor().

Here is the call graph for this function:

void Dali::Internal::RenderTask::SetSourceActor ( Actor actor)

Set the actors to be rendered.

.0

Parameters
[in]actorThis actor and its children will be rendered. If actor is an empty handle, then nothing will be rendered.

Definition at line 80 of file render-task-impl.cpp.

References Dali::Internal::Stage::GetCurrent(), Dali::Internal::Stage::GetRenderTaskList(), mExclusive, mSourceConnector, Dali::Internal::RenderTask::Connector::SetActor(), and Dali::Internal::RenderTaskList::SetExclusive().

Referenced by Dali::Internal::RenderTaskList::CreateTask().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::RenderTask::SetTargetFrameBuffer ( Dali::FrameBufferImage  frameBuffer)

Set the frame-buffer used as a render target.

.0

Parameters
[in]frameBufferA valid frame-buffer handle to enable off-screen rendering, or an uninitialized handle to disable.

Definition at line 141 of file render-task-impl.cpp.

References Dali::Internal::FrameBufferImage::Connect(), Dali::Internal::Object::GetEventThreadServices(), Dali::GetImplementation(), Dali::Internal::Image::GetResourceId(), Dali::Internal::FrameBufferImage::IsNativeFbo(), mFrameBufferImage, mSceneObject, and Dali::Internal::SceneGraph::SetFrameBufferIdMessage().

Here is the call graph for this function:

void Dali::Internal::RenderTask::SetViewport ( const Viewport viewport)

Set the GL viewport used when rendering.

This specifies the transformation between normalized device coordinates and target window (or frame-buffer) coordinates. By default this will match the target window or frame-buffer size. .0

Parameters
[in]viewportThe new viewport.
Note
Unlike the glViewport method, the x & y coordinates refer to the top-left of the viewport rectangle.

Definition at line 222 of file render-task-impl.cpp.

References Dali::Rect< T >::height, SetViewportPosition(), SetViewportSize(), Dali::Rect< T >::width, Dali::Rect< T >::x, and Dali::Rect< T >::y.

Here is the call graph for this function:

void Dali::Internal::RenderTask::SetViewportPosition ( const Vector2 value)

Set the GL viewport position used when rendering.

This specifies the transformation between normalized device coordinates and target window (or frame-buffer) coordinates. By default this will match the target window or frame-buffer size. .0

Parameters
[in]positionThe viewports position (x,y)
Note
Unlike the glViewport method, the x & y coordinates refer to the top-left of the viewport rectangle.

Definition at line 202 of file render-task-impl.cpp.

References Dali::Internal::SceneGraph::BakeViewportPositionMessage(), Dali::Internal::Object::GetEventThreadServices(), and mSceneObject.

Referenced by SetDefaultProperty(), and SetViewport().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::RenderTask::SetViewportSize ( const Vector2 value)

Set the GL viewport size used when rendering.

This specifies the transformation between normalized device coordinates and target window (or frame-buffer) coordinates. By default this will match the target window or frame-buffer size. .0

Parameters
[in]sizeThe viewports size (width,height)

Definition at line 212 of file render-task-impl.cpp.

References Dali::Internal::SceneGraph::BakeViewportSizeMessage(), Dali::Internal::Object::GetEventThreadServices(), and mSceneObject.

Referenced by SetDefaultProperty(), and SetViewport().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::RenderTask::TranslateCoordinates ( Vector2 screenCoords) const

Translates screen coordinates to render task coordinates for offscreen render tasks.

Parameters
[in,out]screenCoordsThe screen coordinates, which may be converted (for off-screen).
Returns
false if the conversion function decides the coordinates are not inside. returns true if there is no conversion function

Definition at line 367 of file render-task-impl.cpp.

References GetCameraActor(), Dali::Internal::Stage::GetCurrent(), Dali::Internal::Actor::GetCurrentSize(), Dali::Internal::Stage::GetDefaultCameraActor(), Dali::Internal::CameraActor::GetProjectionMatrix(), Dali::Internal::Stage::GetSize(), Dali::Internal::CameraActor::GetViewMatrix(), Dali::Rect< T >::height, Dali::Internal::RenderTask::Connector::mActor, mFrameBufferImage, mMappingConnector, mScreenToFrameBufferFunction, Dali::Internal::Actor::ScreenToLocal(), Dali::Rect< T >::width, Dali::Rect< T >::x, Dali::Vector2::x, Dali::Rect< T >::y, Dali::Vector2::y, and Dali::Vector3::y.

Referenced by IsHittable(), and Dali::Internal::Actor::ScreenToLocal().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::RenderTask::ViewportToLocal ( Actor actor,
float  viewportX,
float  viewportY,
float &  localX,
float &  localY 
) const

Definition at line 448 of file render-task-impl.cpp.

References Dali::Internal::Actor::ScreenToLocal().

Here is the call graph for this function:

bool Dali::Internal::RenderTask::WorldToViewport ( const Vector3 position,
float &  viewportX,
float &  viewportY 
) const

Member Data Documentation

Connector Dali::Internal::RenderTask::mCameraConnector
private

Responsible for connecting/disconnecting camera Nodes.

Definition at line 430 of file render-task-impl.h.

Referenced by GetCameraActor(), and SetCameraActor().

Vector4 Dali::Internal::RenderTask::mClearColor
private

Responsible for connecting/disconnection actor node, which used to mapping screen to frame buffer coordinate.

Optional clear color

Definition at line 433 of file render-task-impl.h.

Referenced by CreateSceneObject(), and SetClearColor().

bool Dali::Internal::RenderTask::mClearEnabled
private

True if the render-task should be clear the color buffer.

Definition at line 445 of file render-task-impl.h.

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

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

True if the render-task's actors should be culled.

Definition at line 446 of file render-task-impl.h.

Referenced by CreateSceneObject(), GetCullMode(), and SetCullMode().

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

True if the render-task has exclusive access to the source Nodes.

Definition at line 443 of file render-task-impl.h.

Referenced by CreateSceneObject(), IsExclusive(), SetExclusive(), and SetSourceActor().

Dali::FrameBufferImage Dali::Internal::RenderTask::mFrameBufferImage
private

Optional off-screen render target.

Definition at line 439 of file render-task-impl.h.

Referenced by CreateSceneObject(), DiscardSceneObject(), GetTargetFrameBuffer(), GetViewport(), SetTargetFrameBuffer(), and TranslateCoordinates().

bool Dali::Internal::RenderTask::mInputEnabled
private

True if the render-task should be considered for input handling.

Definition at line 444 of file render-task-impl.h.

Referenced by GetInputEnabled(), IsHittable(), and SetInputEnabled().

bool Dali::Internal::RenderTask::mIsSystemLevel
private

True if the render-task is on the system level task list.

Definition at line 447 of file render-task-impl.h.

Referenced by IsSystemLevel().

Connector Dali::Internal::RenderTask::mMappingConnector
private
unsigned int Dali::Internal::RenderTask::mRefreshOnceCounter
private

Definition at line 437 of file render-task-impl.h.

Referenced by HasFinished().

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

Determines how often the task is processed.

Definition at line 435 of file render-task-impl.h.

Referenced by CreateSceneObject(), GetRefreshRate(), and SetRefreshRate().

SceneGraph::RenderTask* Dali::Internal::RenderTask::mSceneObject
private
Dali::RenderTask::ScreenToFrameBufferFunction Dali::Internal::RenderTask::mScreenToFrameBufferFunction
private

Used to convert screen to frame-buffer coordinates.

Definition at line 441 of file render-task-impl.h.

Referenced by GetScreenToFrameBufferFunction(), SetScreenToFrameBufferFunction(), and TranslateCoordinates().

Dali::RenderTask::RenderTaskSignalType Dali::Internal::RenderTask::mSignalFinished
private

Signal emmited when the render task has been processed.

Definition at line 450 of file render-task-impl.h.

Referenced by EmitSignalFinish(), and FinishedSignal().

Connector Dali::Internal::RenderTask::mSourceConnector
private

Responsible for connecting/disconnecting source Nodes.

Definition at line 429 of file render-task-impl.h.

Referenced by GetSourceActor(), and SetSourceActor().


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