From 4e6b015f967d860214ab1ef1edff5fe9c1ba8c45 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Mon, 22 Nov 2021 16:38:44 +0900 Subject: [PATCH] [Tizen] Update RenderState in PreRender This reverts commit 38ba8471ea1beb0794b96056ab61c92db465766b. Change-Id: Ie4999db1b136db2faad674b33c711d4b7ce2eef8 --- automated-tests/src/dali/dali-test-suite-utils/test-application.cpp | 2 +- dali/integration-api/core.cpp | 4 ++-- dali/integration-api/core.h | 2 +- dali/internal/common/core-impl.cpp | 4 ++-- dali/internal/common/core-impl.h | 2 +- dali/internal/render/common/render-manager.cpp | 5 ++++- dali/internal/render/common/render-manager.h | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp index 440270a..e71166b 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp @@ -220,7 +220,7 @@ bool TestApplication::PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, DoUpdate(intervalMilliseconds, location); mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/); - mCore->PreRender(mScene, damagedRects); + mCore->PreRender(mRenderStatus, mScene, damagedRects); return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate(); } diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index 99001f3..36b6319 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -110,9 +110,9 @@ void Core::PreRender(RenderStatus& status, bool forceClear, bool uploadOnly) mImpl->PreRender(status, forceClear, uploadOnly); } -void Core::PreRender(Integration::Scene& scene, std::vector>& damagedRects) +void Core::PreRender(RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects) { - mImpl->PreRender(scene, damagedRects); + mImpl->PreRender(status, scene, damagedRects); } void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo) diff --git a/dali/integration-api/core.h b/dali/integration-api/core.h index 1dd070d..a5051e5 100644 --- a/dali/integration-api/core.h +++ b/dali/integration-api/core.h @@ -351,7 +351,7 @@ public: * @param[in] scene The scene to be rendered. * @param[out] damagedRects containing damaged render items rects for this pass. */ - void PreRender(Integration::Scene& scene, std::vector>& damagedRects); + void PreRender(RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects); /** * Render a scene in the next frame. This method should be preceded by a call up PreRender. diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index 3b50a24..8402dd6 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -211,9 +211,9 @@ void Core::PreRender(RenderStatus& status, bool forceClear, bool uploadOnly) mRenderManager->PreRender(status, forceClear, uploadOnly); } -void Core::PreRender(Integration::Scene& scene, std::vector>& damagedRects) +void Core::PreRender(RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects) { - mRenderManager->PreRender(scene, damagedRects); + mRenderManager->PreRender(status, scene, damagedRects); } void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo) diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index 9744d0d..7c6cb29 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -135,7 +135,7 @@ public: /** * @copydoc Dali::Integration::Core::PreRender() */ - void PreRender(Integration::Scene& scene, std::vector>& damagedRects); + void PreRender(Integration::RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects); /** * @copydoc Dali::Integration::Core::RenderScene() diff --git a/dali/internal/render/common/render-manager.cpp b/dali/internal/render/common/render-manager.cpp index 3c9f87c..d157b76 100644 --- a/dali/internal/render/common/render-manager.cpp +++ b/dali/internal/render/common/render-manager.cpp @@ -466,7 +466,7 @@ void RenderManager::PreRender(Integration::RenderStatus& status, bool forceClear } } -void RenderManager::PreRender(Integration::Scene& scene, std::vector>& damagedRects) +void RenderManager::PreRender(Integration::RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects) { if(mImpl->partialUpdateAvailable != Integration::PartialUpdateAvailable::TRUE) { @@ -479,9 +479,12 @@ void RenderManager::PreRender(Integration::Scene& scene, std::vector>& if(sceneObject->IsRenderingSkipped()) { // We don't need to calculate dirty rects + status.SetNeedsUpdate(false); return; } + status.SetNeedsUpdate(true); + class DamagedRectsCleaner { public: diff --git a/dali/internal/render/common/render-manager.h b/dali/internal/render/common/render-manager.h index 8b96203..54ed12d 100644 --- a/dali/internal/render/common/render-manager.h +++ b/dali/internal/render/common/render-manager.h @@ -337,7 +337,7 @@ public: * @param[in] scene The scene to be rendered. * @param[out] damagedRects The list of damaged rects for the current render pass. */ - void PreRender(Integration::Scene& scene, std::vector>& damagedRects); + void PreRender(Integration::RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects); // This method should be called from Core::RenderScene() -- 2.7.4