[Tizen] Fix sync issue about window rotation 53/223853/1
authorWonsik Jung <sidein@samsung.com>
Tue, 4 Feb 2020 08:54:18 +0000 (17:54 +0900)
committerWonsik Jung <sidein@samsung.com>
Tue, 4 Feb 2020 08:54:18 +0000 (17:54 +0900)
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

dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/window-system/common/window-render-surface.cpp

index 1270243..b3cef0d 100644 (file)
@@ -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 );
index 570e234..72007f3 100755 (executable)
@@ -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();