eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
}
+ if( timeToSleepUntil == 0 )
+ {
+ // timeToSleepUntil is set to 0 when the thread is initalized or resumed
+ // Let eglImplementation know the first frame after thread initialized or resumed.
+ eglImpl.SetFirstFrameAfterResume();
+ }
+
Integration::RenderStatus renderStatus;
AddPerformanceMarker( PerformanceInterface::RENDER_START );
namespace
{
+ const uint32_t THRESHOLD_SWAPBUFFER_COUNT = 5;
const uint32_t CHECK_EXTENSION_NUMBER = 2;
const std::string EGL_KHR_SURFACELESS_CONTEXT = "EGL_KHR_surfaceless_context";
const std::string EGL_KHR_CREATE_CONTEXT = "EGL_KHR_create_context";
mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ),
mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ),
mIsSurfacelessContextSupported( false ),
- mIsKhrCreateContextSupported( false )
+ mIsKhrCreateContextSupported( false ),
+ mSwapBufferCountAfterResume( 0 )
{
}
{
if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
{
+#ifndef DALI_PROFILE_UBUNTU
+ if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
+ {
+ DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers started.\n" );
+ }
+#endif //DALI_PROFILE_UBUNTU
+
eglSwapBuffers( mEglDisplay, eglSurface );
+
+#ifndef DALI_PROFILE_UBUNTU
+ if( mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT )
+ {
+ DALI_LOG_RELEASE_INFO( "EglImplementation::SwapBuffers finished.\n" );
+ mSwapBufferCountAfterResume++;
+ }
+#endif //DALI_PROFILE_UBUNTU
}
}
mGlesVersion = glesVersion;
}
+void EglImplementation::SetFirstFrameAfterResume()
+{
+ mSwapBufferCountAfterResume = 0;
+}
+
EGLDisplay EglImplementation::GetDisplay() const
{
return mEglDisplay;
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.
*/
bool mStencilBufferRequired;
bool mIsSurfacelessContextSupported;
bool mIsKhrCreateContextSupported;
+
+ uint32_t mSwapBufferCountAfterResume;
};
} // namespace Adaptor