X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Frender-tasks%2Frender-task-impl.h;h=d268b7b7a759a2cbe7a335326ef647b2b6b873eb;hb=50895976db60bf54c0a43b6105080081fef7fbde;hp=4c434a2730e57aebe399ffcd1845f247c844715f;hpb=0819dd0f225e409c39154d1f3a5abe3132844e04;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/render-tasks/render-task-impl.h b/dali/internal/event/render-tasks/render-task-impl.h index 4c434a2..d268b7b 100644 --- a/dali/internal/event/render-tasks/render-task-impl.h +++ b/dali/internal/event/render-tasks/render-task-impl.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_RENDER_TASK_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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,8 +21,9 @@ // INTERNAL INCLUDES #include #include -#include +#include #include +#include namespace Dali { @@ -37,6 +38,7 @@ class EventThreadServices; namespace SceneGraph { class RenderTask; +class Camera; } class RenderTask : public Object @@ -47,9 +49,8 @@ public: /** * Creates a new RenderTask. - * @param[in] isSystemLevel Whether the render-task is on the system level task list. */ - static RenderTask* New( bool isSystemLevel ); + static RenderTask* New(); /** * @copydoc Dali::RenderTask::SetSourceActor() @@ -94,12 +95,22 @@ public: /** * @copydoc Dali::RenderTask::SetTargetFrameBuffer() */ - void SetTargetFrameBuffer( Dali::FrameBufferImage frameBuffer ); + void SetTargetFrameBuffer( FrameBufferImagePtr frameBuffer ); /** * @copydoc Dali::RenderTask::GetTargetFrameBuffer */ - Dali::FrameBufferImage GetTargetFrameBuffer() const; + FrameBufferImage* GetTargetFrameBuffer() const; + + /** + * @copydoc Dali::RenderTask::SetFrameBuffer() + */ + void SetFrameBuffer( FrameBufferPtr frameBuffer ); + + /** + * @copydoc Dali::RenderTask::GetFrameBuffer + */ + FrameBuffer* GetFrameBuffer() const; /** * @copydoc Dali::RenderTask::SetScreenToFrameBufferFunction @@ -162,8 +173,8 @@ public: const Vector4& GetClearColor() const; /** - * Set whether whether GL sync is required for native render target. - * @param[in] requiresSync whether whether GL sync is required. + * Indicate whether GL sync is required for native render target. + * @param[in] requiresSync whether GL sync is required. */ void SetSyncRequired( bool requiresSync ); @@ -196,12 +207,12 @@ public: /** * @copydoc Dali::RenderTask::SetRefreshRate() */ - void SetRefreshRate( unsigned int refreshRate ); + void SetRefreshRate( uint32_t refreshRate ); /** * @copydoc Dali::RenderTask::GetRefreshRate() */ - unsigned int GetRefreshRate() const; + uint32_t GetRefreshRate() const; /** * Check if the render-task is hittable. If render task is offscreen, the screen coordinates may be translated. @@ -218,12 +229,6 @@ public: bool TranslateCoordinates( Vector2& screenCoords ) const; /** - * Query whether the RenderTask is on the system level render-task list. - * @return true, if on the system level task list, false otherwise. - */ - bool IsSystemLevel() const; - - /** * @copydoc Dali::RenderTask::WorldToViewport() */ bool WorldToViewport(const Vector3 &position, float& viewportX, float& viewportY) const; @@ -256,54 +261,24 @@ public: // Used by RenderTaskList, which owns the SceneGraph::RenderTasks public: // Implementation of Object /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() - */ - virtual unsigned int GetDefaultPropertyCount() const; - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() - */ - virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyName() - */ - virtual const char* GetDefaultPropertyName(Property::Index index) const; - - /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() - */ - virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; - - /** - * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() - */ - virtual bool IsDefaultPropertyWritable(Property::Index index) const; - - /** - * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() - */ - virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; - - /** - * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ - virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; + virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::Object::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ - virtual Property::Type GetDefaultPropertyType(Property::Index index) const; + virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::Object::SetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue() */ - virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); + virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const; /** - * @copydoc Dali::Internal::Object::GetDefaultProperty() + * @copydoc Dali::Internal::Object::OnNotifyDefaultPropertyAnimation() */ - virtual Property::Value GetDefaultProperty( Property::Index index ) const; + virtual void OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType, bool animationStarted ); /** * @copydoc Dali::Internal::Object::GetSceneObject() @@ -356,9 +331,8 @@ protected: /** * Construct a new RenderTask. - * @param[in] isSystemLevel Whether the RenderTask is on the system level task list. */ - RenderTask( bool isSystemLevel ); + RenderTask(); /** * A reference counted object may only be deleted by calling Unreference() @@ -432,6 +406,7 @@ protected: RenderTask& mRenderTask; Actor* mActor; ///< Raw-pointer to the actor; not owned. + const SceneGraph::Camera* mCamera; ///< Raw-pointer to camera scene-graph object; not owned. }; private: @@ -440,15 +415,20 @@ private: Connector mSourceConnector; ///< Responsible for connecting/disconnecting source Nodes Connector mCameraConnector; ///< Responsible for connecting/disconnecting camera Nodes - Connector mMappingConnector; /// Responsible for connecting/disconnection actor node, which used to mapping screen to frame buffer coordinate + Connector mMappingConnector; /// Responsible for connecting/disconnecting actor node, which used to mapping screen to frame buffer coordinate Vector4 mClearColor; ///< Optional clear color - unsigned int mRefreshRate; ///< Determines how often the task is processed. + Vector2 mViewportPosition; ///< The cached viewport position + Vector2 mViewportSize; ///< The cached viewport size + + uint32_t mRefreshRate; ///< Determines how often the task is processed. + + uint32_t mRefreshOnceCounter; - unsigned int mRefreshOnceCounter; + FrameBufferImagePtr mFrameBufferImage; ///< Optional off-screen render target. + FrameBufferPtr mFrameBuffer; - Dali::FrameBufferImage mFrameBufferImage; ///< Optional off-screen render target. Dali::RenderTask::ScreenToFrameBufferFunction mScreenToFrameBufferFunction; ///< Used to convert screen to frame-buffer coordinates @@ -456,8 +436,7 @@ private: bool mInputEnabled : 1; ///< True if the render-task should be considered for input handling. bool mClearEnabled : 1; ///< True if the render-task should be clear the color buffer. bool mCullMode : 1; ///< True if the render-task's actors should be culled - bool mIsSystemLevel : 1; ///< True if the render-task is on the system level task list. - bool mRequiresSync : 1; ///< True if the GL sync is required to track the render of + bool mRequiresSync : 1; ///< True if the GL sync is required to track the render of. //Signals Dali::RenderTask::RenderTaskSignalType mSignalFinished; ///< Signal emmited when the render task has been processed.