mRunning = TRUE;
mForceClear = TRUE;
- }
- DALI_LOG_RELEASE_INFO( "CombinedUpdateRenderController::Resume\n" );
+ DALI_LOG_RELEASE_INFO( "CombinedUpdateRenderController::Resume\n" );
+ }
+ else
+ {
+ DALI_LOG_RELEASE_INFO( "CombinedUpdateRenderController::Resume: Already resumed [%d, %d, %d]\n", mRunning, mUpdateRenderRunCount, mUpdateRenderThreadCanSleep );
+ }
}
void CombinedUpdateRenderController::Stop()
EglInterface* eglInterface = &eglGraphics->GetEglInterface();
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( *eglInterface );
+
// Try to use OpenGL es 3.0
// ChooseConfig returns false here when the device only support gles 2.0.
// Because eglChooseConfig with gles 3.0 setting fails when the device only support gles 2.0 and Our default setting is gles 3.0.
- if( eglImpl.ChooseConfig( true, COLOR_DEPTH_32 ) )
+ if( !eglImpl.ChooseConfig( true, COLOR_DEPTH_32 ) )
+ {
+ // Retry to use OpenGL es 2.0
+ eglGraphics->SetGlesVersion( 20 );
+ eglImpl.ChooseConfig( true, COLOR_DEPTH_32 );
+ }
+ else
+ {
+ if( !eglImpl.CreateContext() )
+ {
+ // Retry to use OpenGL es 2.0
+ eglGraphics->SetGlesVersion( 20 );
+ eglImpl.ChooseConfig( true, COLOR_DEPTH_32 );
+ }
+ }
+
+ // Check whether surfaceless context is supported
+ bool isSurfacelessContextSupported = eglImpl.IsSurfacelessContextSupported();
+ eglGraphics->SetIsSurfacelessContextSupported( isSurfacelessContextSupported );
+
+ if ( isSurfacelessContextSupported )
{
// Create a surfaceless OpenGL context for shared resources
- eglImpl.CreateContext();
+ if( eglImpl.GetContext() == 0 )
+ {
+ eglImpl.CreateContext();
+ }
eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
}
- else // Retry to use OpenGL es 2.0
+ else
{
- eglGraphics->SetGlesVersion( 20 );
currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
if( currentSurface )
{
}
}
- if( eglImpl.GetGlesVersion() >= 30 )
+ if( eglImpl.IsSurfacelessContextSupported() )
{
// Make the shared surfaceless context as current before rendering
eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );