From ecce5df5804c78d604c492893d9b429b9d2038d8 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 9 Jun 2023 17:00:13 +0900 Subject: [PATCH] [Tizen] Do not reset mPostRendering in ResizeSurface We should wait for PostRenderComplete in this case Change-Id: Iad8518bfe9485a6206d91c8fba1875249f8f0587 --- .../adaptor/common/combined-update-render-controller.cpp | 15 ++++++++------- .../adaptor/common/combined-update-render-controller.h | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 9679554..8d73e51 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -92,7 +92,6 @@ CombinedUpdateRenderController::CombinedUpdateRenderController(AdaptorInternalSe mEventThreadSemaphore(0), mSurfaceSemaphore(0), mUpdateRenderThreadWaitCondition(), - mPostRenderWaitCondition(), mAdaptorInterfaces(adaptorInterfaces), mPerformanceInterface(adaptorInterfaces.GetPerformanceInterface()), mCore(adaptorInterfaces.GetCore()), @@ -309,7 +308,8 @@ void CombinedUpdateRenderController::ReplaceSurface(Dali::RenderSurfaceInterface // Start replacing the surface. { ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition); - mNewSurface = newSurface; + mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will replace the surface now + mNewSurface = newSurface; mUpdateRenderThreadWaitCondition.Notify(lock); } @@ -331,6 +331,7 @@ void CombinedUpdateRenderController::DeleteSurface(Dali::RenderSurfaceInterface* // Start replacing the surface. { ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition); + mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will delete the surface now mDeletedSurface = surface; mUpdateRenderThreadWaitCondition.Notify(lock); } @@ -953,9 +954,9 @@ void CombinedUpdateRenderController::AddPerformanceMarker(PerformanceInterface:: void CombinedUpdateRenderController::PostRenderComplete() { - ConditionalWait::ScopedLock lock(mPostRenderWaitCondition); + ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition); mPostRendering = FALSE; - mPostRenderWaitCondition.Notify(lock); + mUpdateRenderThreadWaitCondition.Notify(lock); } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -964,19 +965,19 @@ void CombinedUpdateRenderController::PostRenderComplete() void CombinedUpdateRenderController::PostRenderStarted() { - ConditionalWait::ScopedLock lock(mPostRenderWaitCondition); + ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition); mPostRendering = TRUE; } void CombinedUpdateRenderController::PostRenderWaitForCompletion() { - ConditionalWait::ScopedLock lock(mPostRenderWaitCondition); + ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition); while(mPostRendering && !mNewSurface && // We should NOT wait if we're replacing the surface !mDeletedSurface && // We should NOT wait if we're deleting the surface !mDestroyUpdateRenderThread) { - mPostRenderWaitCondition.Wait(lock); + mUpdateRenderThreadWaitCondition.Wait(lock); } } diff --git a/dali/internal/adaptor/common/combined-update-render-controller.h b/dali/internal/adaptor/common/combined-update-render-controller.h index 3c4f29b..d0e0f07 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.h +++ b/dali/internal/adaptor/common/combined-update-render-controller.h @@ -340,7 +340,6 @@ private: Semaphore<> mSurfaceSemaphore; ///< Used by the event thread to ensure the surface has been deleted or replaced. ConditionalWait mUpdateRenderThreadWaitCondition; ///< The wait condition for the update-render-thread. - ConditionalWait mPostRenderWaitCondition; ///< The wait condition for the post render. AdaptorInternalServices& mAdaptorInterfaces; ///< The adaptor internal interface PerformanceInterface* mPerformanceInterface; ///< The performance logging interface -- 2.7.4