X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Frender-tasks%2Frender-task-list-impl.h;h=068a42fcc2d5064741c63ddb1a233831cefc44f1;hb=c1df908470fc3dd242fef202248e56009727bca4;hp=6d351c2073379c76622d76789376d68df724eb05;hpb=87ad4cbdcdc1c5653db58582e42d6672a97b6570;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/render-tasks/render-task-list-impl.h b/dali/internal/event/render-tasks/render-task-list-impl.h index 6d351c2..068a42f 100644 --- a/dali/internal/event/render-tasks/render-task-list-impl.h +++ b/dali/internal/event/render-tasks/render-task-list-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_RENDER_TASK_LIST_H__ -#define __DALI_INTERNAL_RENDER_TASK_LIST_H__ +#ifndef DALI_INTERNAL_RENDER_TASK_LIST_H +#define DALI_INTERNAL_RENDER_TASK_LIST_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,9 +21,10 @@ // INTERNAL INCLUDES #include #include -#include #include #include +#include +#include namespace Dali { @@ -36,8 +37,9 @@ class RenderTaskDefaults; class Actor; class CameraActor; +using RenderTaskPtr = IntrusivePtr; class RenderTaskList; -typedef IntrusivePtr RenderTaskListPtr; +using RenderTaskListPtr = IntrusivePtr; namespace SceneGraph { @@ -53,14 +55,16 @@ class RenderTaskList : public BaseObject, public CompleteNotificationInterface { public: - typedef std::vector< Dali::RenderTask > RenderTaskContainer; + using RenderTaskContainer = std::vector< RenderTaskPtr >; struct Exclusive { RenderTask* renderTaskPtr; ///< Pointer for comparison with current rendertask. - Actor* actorPtr; ///< Pointer for comparison with current actor. + ActorObserver actor; ///< For comparison with current actor. }; + using ExclusivesContainer = std::vector< Exclusive >; + /** * Create a RenderTaskList. * @return A newly allocated RenderTaskList; the caller takes ownership. @@ -70,7 +74,7 @@ public: /** * @copydoc Dali::RenderTaskList::CreateTask() */ - Dali::RenderTask CreateTask(); + RenderTaskPtr CreateTask(); /** * @brief Creates a new RenderTask. @@ -81,12 +85,12 @@ public: * @param[in] cameraActor The actor from which the scene is viewed for this render task. * @return A valid handle to a new RenderTask */ - Dali::RenderTask CreateTask( Actor* sourceActor, CameraActor* cameraActor); + RenderTaskPtr CreateTask( Actor* sourceActor, CameraActor* cameraActor); /** * @copydoc Dali::RenderTaskList::RemoveTask() */ - void RemoveTask( Dali::RenderTask task ); + void RemoveTask( Internal::RenderTask& task ); /** * @copydoc Dali::RenderTaskList::GetTaskCount() @@ -96,7 +100,7 @@ public: /** * @copydoc Dali::RenderTaskList::GetTask() */ - Dali::RenderTask GetTask( uint32_t index ) const; + RenderTaskPtr GetTask( uint32_t index ) const; /** * Retrieve the container of render-tasks. @@ -120,7 +124,7 @@ public: * * @return [description] */ - const Vector< Exclusive >& GetExclusivesList() const + const ExclusivesContainer& GetExclusivesList() const { return mExclusives; } @@ -139,6 +143,12 @@ public: */ void RecoverFromContextLoss(); + /** + * Retrieve the SceneGraph::RenderTaskList object. + * @return The RenderTaskList. + */ + const SceneGraph::RenderTaskList& GetSceneObject() const; + protected: /** @@ -156,16 +166,6 @@ protected: */ void Initialize(); - /** - * Helper to create a scene-graph render task list - */ - void CreateSceneObject(); - - /** - * Helper to destroy a scene-graph render task list - */ - void DestroySceneObject(); - private: // from CompleteNotificationInterface /** @@ -181,7 +181,7 @@ private: SceneGraph::RenderTaskList* mSceneObject; ///< Raw-pointer to the scene-graph object; not owned. RenderTaskContainer mTasks; ///< Reference counted render-tasks - Vector< Exclusive > mExclusives; ///< List of rendertasks with exclusively owned source actors. + ExclusivesContainer mExclusives; ///< List of rendertasks with exclusively owned source actors. }; } // namespace Internal @@ -208,4 +208,4 @@ inline const Internal::RenderTaskList& GetImplementation(const Dali::RenderTaskL } // namespace Dali -#endif //__DALI_INTERNAL_RENDER_TASK_LIST_H__ +#endif // DALI_INTERNAL_RENDER_TASK_LIST_H