From c17d02729a43a3f76fff1d56ea2c9bb01a23d99a Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Thu, 25 Jan 2018 18:53:40 +0900 Subject: [PATCH] Revert "[4.0] Discard render instruction if it is empty" This reverts commit 761ca2391a3a7632f7d0728b6685eb4208dc7713. Change-Id: I84c617396c76b1bef605c9d63d327c2d7395009e --- dali/internal/render/common/render-instruction-container.cpp | 4 ---- dali/internal/render/common/render-instruction-container.h | 6 ------ dali/internal/render/common/render-manager.cpp | 4 ++-- dali/internal/update/manager/render-instruction-processor.cpp | 11 +---------- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/dali/internal/render/common/render-instruction-container.cpp b/dali/internal/render/common/render-instruction-container.cpp index 9b16af8..3cbff8a 100644 --- a/dali/internal/render/common/render-instruction-container.cpp +++ b/dali/internal/render/common/render-instruction-container.cpp @@ -80,10 +80,6 @@ RenderInstruction& RenderInstructionContainer::At( BufferIndex bufferIndex, size return *mInstructions[ bufferIndex ][ index ]; } -void RenderInstructionContainer::DiscardCurrentInstruction( BufferIndex bufferIndex ) -{ - mIndex[ bufferIndex ]--; -} } // namespace SceneGraph diff --git a/dali/internal/render/common/render-instruction-container.h b/dali/internal/render/common/render-instruction-container.h index 9181243..1bcff8b 100644 --- a/dali/internal/render/common/render-instruction-container.h +++ b/dali/internal/render/common/render-instruction-container.h @@ -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 diff --git a/dali/internal/render/common/render-manager.cpp b/dali/internal/render/common/render-manager.cpp index 712d268..9261a6d 100644 --- a/dali/internal/render/common/render-manager.cpp +++ b/dali/internal/render/common/render-manager.cpp @@ -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; diff --git a/dali/internal/update/manager/render-instruction-processor.cpp b/dali/internal/update/manager/render-instruction-processor.cpp index b95706f..b4035e8 100644 --- a/dali/internal/update/manager/render-instruction-processor.cpp +++ b/dali/internal/update/manager/render-instruction-processor.cpp @@ -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 -- 2.7.4