Friendly janitor cleaning up unnecessary header dependencies
[platform/core/uifw/dali-core.git] / dali / internal / update / render-tasks / scene-graph-render-task.h
index 170b80f..1adf697 100644 (file)
@@ -24,7 +24,6 @@
 #include <dali/internal/common/buffer-index.h>
 #include <dali/internal/common/event-to-update.h>
 #include <dali/internal/common/message.h>
-#include <dali/internal/update/common/double-buffered.h>
 #include <dali/internal/update/common/property-owner.h>
 #include <dali/internal/update/common/animatable-property.h>
 
@@ -97,12 +96,6 @@ public:
   void SetCameraNode( Node* node );
 
   /**
-   * Retrieve the camera node.
-   * @return The scene is viewed from the perspective of this node.
-   */
-  Node* GetCameraNode() const;
-
-  /**
    * Set the frame-buffer used as a render target.
    * @param[in] resourceId The resource ID of the frame-buffer, or zero if not rendering off-screen.
    */
@@ -213,6 +206,16 @@ public:
   bool GetClearEnabled() const;
 
   /**
+   * @copydoc Dali::RenderTask::SetCullMode()
+   */
+  void SetCullMode( bool mode );
+
+  /**
+   * @copydoc Dali::RenderTask::GetCullMode()
+   */
+  bool GetCullMode() const;
+
+  /**
    * Set the refresh-rate of the RenderTask.
    * @param[in] refreshRate The new refresh rate.
    */
@@ -239,11 +242,16 @@ public:
   bool IsRenderRequired();
 
   /**
+   * Set whether all resources were available when the render-task was processed
+   * @param[in] resourcesComplete True if the resources of the source tree are completely loaded.
+   */
+  void SetResourcesFinished( bool resourcesFinished );
+
+  /**
    * 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).
-   * @param[in] resourcesComplete true if the resources of the source tree are completely loaded.
    */
-  void UpdateState( bool resourcesComplete );
+  void UpdateState();
 
   /**
    * Return true only if currently waiting for the render task to
@@ -298,6 +306,11 @@ public:
    */
   void SetCompleteStatusManager( CompleteStatusManager* completeStatusManager );
 
+  /**
+   * @return A pointer to the camera used by the RenderTask
+   */
+  Node* GetCamera() const;
+
 private:
 
   /**
@@ -327,10 +340,12 @@ private:
   CameraAttachment* mCameraAttachment;
   unsigned int mFrameBufferResourceId;
 
+  bool mResourcesFinished:1; ///< True if all resources were available when the render-task was processed
   bool mWaitingToRender:1; ///< True when an render once to FBO is waiting
   bool mNotifyTrigger:1; ///< True if a render once render task has finished renderering
   bool mExclusive: 1; ///< Whether the render task has exclusive access to the source actor (node in the scene graph implementation).
   bool mClearEnabled: 1; ///< Whether previous results are cleared.
+  bool mCullMode: 1; ///< Whether renderers should be frustum culled
 
   FrameBufferTexture* mRenderTarget;
   Viewport mViewport;
@@ -389,6 +404,17 @@ inline void SetClearEnabledMessage( EventToUpdate& eventToUpdate, RenderTask& ta
   new (slot) LocalType( &task, &RenderTask::SetClearEnabled, enabled );
 }
 
+inline void SetCullModeMessage( EventToUpdate& eventToUpdate, RenderTask& task, bool mode )
+{
+  typedef MessageValue1< RenderTask, bool > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+
+  // Construct message in the message queue memory; note that delete should not be called on the return value
+  new (slot) LocalType( &task, &RenderTask::SetCullMode, mode );
+}
+
 inline void SetRefreshRateMessage( EventToUpdate& eventToUpdate, RenderTask& task, unsigned int refreshRate )
 {
   typedef MessageValue1< RenderTask, unsigned int > LocalType;