Revert "[4.0] Discard render instruction if it is empty" 80/168880/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 1 Feb 2018 00:13:22 +0000 (09:13 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 1 Feb 2018 01:13:06 +0000 (10:13 +0900)
This reverts commit 3f144756eeb5e99e23ec61e6d4902932397da6b8.

Change-Id: I6966dd706bc4dd989d00a72f00422291d9eceed6

dali/internal/render/common/render-instruction-container.cpp
dali/internal/render/common/render-instruction-container.h
dali/internal/render/common/render-manager.cpp
dali/internal/update/manager/render-instruction-processor.cpp

index 9b16af8..3cbff8a 100644 (file)
@@ -80,10 +80,6 @@ RenderInstruction& RenderInstructionContainer::At( BufferIndex bufferIndex, size
   return *mInstructions[ bufferIndex ][ index ];
 }
 
-void RenderInstructionContainer::DiscardCurrentInstruction( BufferIndex bufferIndex )
-{
-  mIndex[ bufferIndex ]--;
-}
 
 } // namespace SceneGraph
 
index 9181243..1bcff8b 100644 (file)
@@ -76,12 +76,6 @@ public:
    */
   RenderInstruction& At( BufferIndex bufferIndex, size_t index );
 
-  /**
-   * Discard the current container index
-   * @param bufferIndex to reset
-   */
-  void DiscardCurrentInstruction( BufferIndex bufferIndex );
-
 private:
 
   unsigned int mIndex[ 2 ]; ///< count of the elements that have been added
index 712d268..9261a6d 100644 (file)
@@ -472,6 +472,8 @@ void RenderManager::Render( Integration::RenderStatus& status )
     GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
     mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
 
+    mImpl->UpdateTrackers();
+
     //Notify RenderGeometries that rendering has finished
     for ( auto&& iter : mImpl->geometryContainer )
     {
@@ -479,8 +481,6 @@ void RenderManager::Render( Integration::RenderStatus& status )
     }
   }
 
-  mImpl->UpdateTrackers();
-
   // If this frame was rendered due to instructions existing, we mark this so we know to clear the next frame.
   mImpl->lastFrameWasRendered = haveInstructions;
 
index b95706f..b4035e8 100644 (file)
@@ -400,7 +400,6 @@ void RenderInstructionProcessor::Prepare( BufferIndex updateBufferIndex,
   RenderInstruction& instruction = instructions.GetNextInstruction( updateBufferIndex );
   renderTask.PrepareRenderInstruction( instruction, updateBufferIndex );
   bool viewMatrixHasNotChanged = !renderTask.ViewMatrixUpdated();
-  bool isRenderListAdded = false;
 
   const Matrix& viewMatrix = renderTask.GetViewMatrix( updateBufferIndex );
   SceneGraph::Camera& camera = renderTask.GetCamera();
@@ -431,8 +430,6 @@ void RenderInstructionProcessor::Prepare( BufferIndex updateBufferIndex,
         // We only use the clipping version of the sort comparitor if any clipping nodes exist within the RenderList.
         SortRenderItems( updateBufferIndex, *renderList, layer, hasClippingNodes );
       }
-
-      isRenderListAdded = true;
     }
 
     if( !layer.overlayRenderables.Empty() )
@@ -453,20 +450,14 @@ void RenderInstructionProcessor::Prepare( BufferIndex updateBufferIndex,
         // Clipping hierarchy is irrelevant when sorting overlay items, so we specify using the non-clipping version of the sort comparitor.
         SortRenderItems( updateBufferIndex, *renderList, layer, false );
       }
-
-      isRenderListAdded = true;
     }
   }
 
   // Inform the render instruction that all renderers have been added and this frame is complete.
   instruction.UpdateCompleted();
-
-  if( !isRenderListAdded && !instruction.mIsClearColorSet )
-  {
-    instructions.DiscardCurrentInstruction( updateBufferIndex );
-  }
 }
 
+
 } // SceneGraph
 
 } // Internal