Change using flag timeToSleepUntil to mForceClear to show swapbuffer logs. 36/214936/2
authorSeungho, Baek <sbsh.baek@samsung.com>
Mon, 30 Sep 2019 05:03:50 +0000 (14:03 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Tue, 1 Oct 2019 02:11:09 +0000 (11:11 +0900)
 - timeToSleepUntil is set to 0 not only resume case but also the thread is initialized.

Change-Id: Id4db2e97c8cfbc1bbd06a12b2e552f5f538527a8
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/adaptor/common/combined-update-render-controller.h

index f0a5e65..8aac435 100644 (file)
@@ -116,7 +116,8 @@ CombinedUpdateRenderController::CombinedUpdateRenderController( AdaptorInternalS
   mPostRendering( FALSE ),
   mSurfaceResized( FALSE ),
   mForceClear( FALSE ),
-  mUploadWithoutRendering( FALSE )
+  mUploadWithoutRendering( FALSE ),
+  mFirstFrameAfterResume( FALSE )
 {
   LOG_EVENT_TRACE;
 
@@ -216,6 +217,7 @@ void CombinedUpdateRenderController::Resume()
 
     mRunning = TRUE;
     mForceClear = TRUE;
+    mFirstFrameAfterResume = TRUE;
 
     DALI_LOG_RELEASE_INFO( "CombinedUpdateRenderController::Resume\n" );
   }
@@ -635,11 +637,12 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
     }
 
-    if( timeToSleepUntil == 0 )
+    if( mFirstFrameAfterResume )
     {
-      // timeToSleepUntil is set to 0 when the thread is initalized or resumed
+      // mFirstFrameAfterResume is set to true when the thread is resumed
       // Let eglImplementation know the first frame after thread initialized or resumed.
       eglImpl.SetFirstFrameAfterResume();
+      mFirstFrameAfterResume = FALSE;
     }
 
     Integration::RenderStatus renderStatus;
index e83bacb..cfcb25b 100644 (file)
@@ -370,6 +370,8 @@ private:
   volatile unsigned int             mForceClear;                       ///< Will be set to clear forcibly
 
   volatile unsigned int             mUploadWithoutRendering;           ///< Will be set to upload the resource only (with no rendering)
+
+  volatile unsigned int             mFirstFrameAfterResume;            ///< Will be set to check the first frame after resume (for log)
 };
 
 } // namespace Adaptor