From: Heeyong Song Date: Mon, 19 Sep 2022 02:56:45 +0000 (+0900) Subject: Submit command buffer when rendering is skipped X-Git-Tag: dali_2.1.41~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F281430%2F1;p=platform%2Fcore%2Fuifw%2Fdali-core.git Submit command buffer when rendering is skipped Change-Id: I4b9be39763b82d96982454e9bad356a38aceb600 --- diff --git a/dali/internal/render/common/render-manager.cpp b/dali/internal/render/common/render-manager.cpp index dff1e74..75a80a2 100644 --- a/dali/internal/render/common/render-manager.cpp +++ b/dali/internal/render/common/render-manager.cpp @@ -189,6 +189,8 @@ struct RenderManager::Impl std::unique_ptr threadPool; ///< The thread pool Vector boundTextures; ///< The textures bound for rendering Vector textureDependencyList; ///< The dependency list of bound textures + + bool commandBufferSubmitted{false}; }; RenderManager* RenderManager::New(Graphics::Controller& graphicsController, @@ -465,6 +467,8 @@ void RenderManager::PreRender(Integration::RenderStatus& status, bool forceClear geom->Upload(mImpl->graphicsController); } } + + mImpl->commandBufferSubmitted = false; } void RenderManager::PreRender(Integration::Scene& scene, std::vector>& damagedRects) @@ -947,6 +951,7 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration:: mImpl->uniformBufferManager->UnlockUniformBuffer(mImpl->renderBufferIndex); mImpl->renderAlgorithms.SubmitCommandBuffer(); + mImpl->commandBufferSubmitted = true; std::sort(targetstoPresent.begin(), targetstoPresent.end()); @@ -963,6 +968,14 @@ void RenderManager::RenderScene(Integration::RenderStatus& status, Integration:: void RenderManager::PostRender() { + if(!mImpl->commandBufferSubmitted) + { + // Rendering is skipped but there may be pending commands + // Submit command buffers + mImpl->renderAlgorithms.SubmitCommandBuffer(); + mImpl->commandBufferSubmitted = true; + } + // Notify RenderGeometries that rendering has finished for(auto&& iter : mImpl->geometryContainer) {