Merge branch 'devel/master' into devel/new_mesh
[platform/core/uifw/dali-core.git] / dali / internal / update / render-tasks / scene-graph-render-task.cpp
index d8088ed..379cb39 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/internal/update/resources/resource-manager.h>
 #include <dali/internal/update/resources/complete-status-manager.h>
 #include <dali/internal/update/nodes/node.h>
-#include <dali/internal/update/node-attachments/scene-graph-camera-attachment.h>
 #include <dali/internal/render/common/render-instruction.h>
 
 #include <dali/internal/update/render-tasks/scene-graph-render-task-debug.h>
@@ -240,6 +239,10 @@ unsigned int RenderTask::GetRefreshRate() const
 
 bool RenderTask::ReadyToRender( BufferIndex updateBufferIndex )
 {
+  // If the source node of the render task is invisible we should still render
+  // We want the render task to complete and possible clear colors to happen
+
+  // Check source node
   if ( NULL == mSourceNode ||
        ( !mSourceNode->IsRoot() && NULL == mSourceNode->GetParent() ) )
   {
@@ -249,13 +252,7 @@ bool RenderTask::ReadyToRender( BufferIndex updateBufferIndex )
     return false;
   }
 
-  // Check if the source node (root actor) and all its ancestors are visible.
-  if( !mSourceNode->IsFullyVisible( updateBufferIndex ) )
-  {
-    TASK_LOG_FMT(Debug::General, " =F  No visible source  FC:%d\n", mFrameCounter );
-    return false;
-  }
-
+  // Check camera node
   if ( NULL == mCameraNode ||
        NULL == mCameraNode->GetParent() ||
        !mCameraNode->HasAttachment() )
@@ -406,6 +403,12 @@ const Matrix& RenderTask::GetViewMatrix( BufferIndex bufferIndex ) const
   return mCameraAttachment->GetViewMatrix( bufferIndex );
 }
 
+SceneGraph::CameraAttachment& RenderTask::GetCameraAttachment() const
+{
+  DALI_ASSERT_DEBUG( NULL != mCameraAttachment );
+  return *mCameraAttachment;
+}
+
 const Matrix& RenderTask::GetProjectionMatrix( BufferIndex bufferIndex ) const
 {
   DALI_ASSERT_DEBUG( NULL != mCameraAttachment );