Revert "[Tizen] Add codes for Dali Windows Backend"
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-manager.cpp
index 9261a6d..baa2560 100644 (file)
@@ -397,7 +397,7 @@ ProgramCache* RenderManager::GetProgramCache()
   return &(mImpl->programController);
 }
 
-void RenderManager::Render( Integration::RenderStatus& status )
+void RenderManager::Render( Integration::RenderStatus& status, bool forceClear )
 {
   DALI_PRINT_RENDER_START( mImpl->renderBufferIndex );
 
@@ -414,7 +414,7 @@ void RenderManager::Render( Integration::RenderStatus& status )
   const bool haveInstructions = count > 0u;
 
   // Only render if we have instructions to render, or the last frame was rendered (and therefore a clear is required).
-  if( haveInstructions || mImpl->lastFrameWasRendered )
+  if( haveInstructions || mImpl->lastFrameWasRendered || forceClear )
   {
     // Mark that we will require a post-render step to be performed (includes swap-buffers).
     status.SetNeedsPostRender( true );
@@ -472,8 +472,6 @@ 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 )
     {
@@ -481,6 +479,8 @@ 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;