X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fgraphics%2Fgles%2Fegl-implementation.cpp;h=32343934185b0ba181c9f6167cf579a48596f187;hb=516f995386b5d0e2801ba7d41553e6bfb444b418;hp=3885134d5cd7d3ab3db00fc7881113a2bc06b39b;hpb=b7a80394d6edc287cf4283b7a5d4a44b71e3bfc0;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/graphics/gles/egl-implementation.cpp b/dali/internal/graphics/gles/egl-implementation.cpp index 3885134..3234393 100755 --- a/dali/internal/graphics/gles/egl-implementation.cpp +++ b/dali/internal/graphics/gles/egl-implementation.cpp @@ -35,6 +35,7 @@ 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"; @@ -81,7 +82,8 @@ EglImplementation::EglImplementation( int multiSamplingLevel, mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ), mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE ), mIsSurfacelessContextSupported( false ), - mIsKhrCreateContextSupported( false ) + mIsKhrCreateContextSupported( false ), + mSwapBufferCountAfterResume( 0 ) { } @@ -310,7 +312,22 @@ void EglImplementation::SwapBuffers( EGLSurface& eglSurface ) { 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 } } @@ -505,8 +522,11 @@ bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSur // the surface is bound to the context, so set the context to null MakeContextNull(); - // destroy the surface - DestroySurface( eglSurface ); + if( eglSurface ) + { + // destroy the surface + DestroySurface( eglSurface ); + } // create the EGL surface EGLSurface newEglSurface = CreateSurfaceWindow( window, mColorDepth ); @@ -536,6 +556,11 @@ void EglImplementation::SetGlesVersion( const int32_t glesVersion ) mGlesVersion = glesVersion; } +void EglImplementation::SetFirstFrameAfterResume() +{ + mSwapBufferCountAfterResume = 0; +} + EGLDisplay EglImplementation::GetDisplay() const { return mEglDisplay;