From f6641662d7eae975fe6ceef1a0c517302370e8ef Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 4 Feb 2020 17:54:18 +0900 Subject: [PATCH] [Tizen] Fix sync issue about window rotation Fix sync issue window rotation. Window_rotation_done_send should be called before eglSwapBuffers. Window_rotation_done_send is called in event thread and eglSwapBuffers is called in render thread. Basically the logic is designed for that, but, sync issue occurs. This patch is to fix sync issue. Change-Id: I138c8ac1b6bc00224712674058e9f561be19a20f --- .../internal/adaptor/common/combined-update-render-controller.cpp | 1 - dali/internal/window-system/common/window-render-surface.cpp | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dali/internal/adaptor/common/combined-update-render-controller.cpp b/dali/internal/adaptor/common/combined-update-render-controller.cpp index 1270243..b3cef0d 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.cpp +++ b/dali/internal/adaptor/common/combined-update-render-controller.cpp @@ -884,7 +884,6 @@ void CombinedUpdateRenderController::PostRenderWaitForCompletion() while( mPostRendering && ! mNewSurface && // We should NOT wait if we're replacing the surface ! mDeletedSurface && // We should NOT wait if we're deleting the surface - ! mSurfaceResized && // We should NOT wait if we're resizing the surface ! mDestroyUpdateRenderThread ) { mUpdateRenderThreadWaitCondition.Wait( lock ); diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 570e234..72007f3 100755 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -519,7 +519,13 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b { if( !mRotationFinished ) { - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PostRender: Trigger rotation event\n" ); + if( mThreadSynchronization ) + { + // Enable PostRender flag + mThreadSynchronization->PostRenderStarted(); + } + + DALI_LOG_RELEASE_INFO("WindowRenderSurface::PostRender: Trigger rotation event\n" ); mRotationTrigger->Trigger(); -- 2.7.4