[Tizen] Log patch to show first swapbuffers call after resume
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 10 Sep 2019 09:16:54 +0000 (18:16 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Tue, 10 Sep 2019 09:16:58 +0000 (18:16 +0900)
This reverts commit 6a17b1520b157712457cbf6a8af394b02782d062.

Change-Id: I80e7c91a1ba15098b9afd6c1748754c6ce503eba

dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/gles/egl-implementation.h

index 94693d2..66f32d5 100644 (file)
@@ -633,6 +633,11 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
     }
 
+    if( timeToSleepUntil == 0 )
+    {
+      eglImpl.SetFirstFrameAfterResume();
+    }
+
     Integration::RenderStatus renderStatus;
 
     AddPerformanceMarker( PerformanceInterface::RENDER_START );
index 3885134..ae95d25 100755 (executable)
@@ -81,7 +81,8 @@ EglImplementation::EglImplementation( int multiSamplingLevel,
   mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ),
   mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ),
   mIsSurfacelessContextSupported( false ),
-  mIsKhrCreateContextSupported( false )
+  mIsKhrCreateContextSupported( false ),
+  mIsFirstFrameAfterResume( false )
 {
 }
 
@@ -310,6 +311,11 @@ void EglImplementation::SwapBuffers( EGLSurface& eglSurface )
 {
   if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
   {
+    if( mIsFirstFrameAfterResume )
+    {
+      DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers: First SwapBuffers call.\n" );
+      mIsFirstFrameAfterResume = false;
+    }
     eglSwapBuffers( mEglDisplay, eglSurface );
   }
 }
@@ -536,6 +542,11 @@ void EglImplementation::SetGlesVersion( const int32_t glesVersion )
   mGlesVersion = glesVersion;
 }
 
+void EglImplementation::SetFirstFrameAfterResume()
+{
+  mIsFirstFrameAfterResume = true;
+}
+
 EGLDisplay EglImplementation::GetDisplay() const
 {
   return mEglDisplay;
index 1c9cab3..c0cf433 100644 (file)
@@ -182,6 +182,11 @@ public:
   void SetGlesVersion( const int32_t glesVersion );
 
   /**
+   * Sets Whether the frame is the first after Resume.
+   */
+  void SetFirstFrameAfterResume();
+
+  /**
    * returns the display with which this object was initialized
    * @return the EGL Display.
    */
@@ -245,6 +250,8 @@ private:
   bool                 mStencilBufferRequired;
   bool                 mIsSurfacelessContextSupported;
   bool                 mIsKhrCreateContextSupported;
+
+  bool                 mIsFirstFrameAfterResume;
 };
 
 } // namespace Adaptor