#define __DALI_INTERNAL_RENDER_TASK_H__
/*
- * Copyright (c) 2016 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.
// INTERNAL INCLUDES
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/render-tasks/render-task.h>
-#include <dali/public-api/images/frame-buffer-image.h>
+#include <dali/internal/event/images/frame-buffer-image-impl.h>
#include <dali/internal/event/common/object-impl.h>
#include <dali/internal/event/rendering/frame-buffer-impl.h>
/**
* 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()
/**
* @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( Dali::FrameBuffer frameBuffer );
+ void SetFrameBuffer( FrameBufferPtr frameBuffer );
/**
* @copydoc Dali::RenderTask::GetFrameBuffer
/**
* @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.
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;
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()
/**
* 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()
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.
- unsigned int mRefreshOnceCounter;
+ uint32_t mRefreshOnceCounter;
- Dali::FrameBufferImage mFrameBufferImage; ///< Optional off-screen render target.
+ FrameBufferImagePtr mFrameBufferImage; ///< Optional off-screen render target.
FrameBufferPtr mFrameBuffer;
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.
//Signals