Fix sync issue about window rotation 33/224333/1
authorWonsik Jung <sidein@samsung.com>
Tue, 4 Feb 2020 08:54:18 +0000 (17:54 +0900)
committerWonsik Jung <sidein@samsung.com>
Mon, 10 Feb 2020 02:25:52 +0000 (11:25 +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 8be71f8..4b794ce 100644 (file)
@@ -910,7 +910,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 2561bb2..a5402f5 100644 (file)
@@ -415,7 +415,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();