Revert "[4.0] Discard render instruction if it is empty"
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / render-instruction-processor.cpp
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