+bool ConfigurationManager::IsAdvancedBlendEquationSupported()
+{
+ if ( !mIsAdvancedBlendEquationSupportedCached )
+ {
+ RetrieveKeysFromConfigFile( mSystemCacheFilePath );
+
+ if ( !mIsAdvancedBlendEquationSupportedCached )
+ {
+ EglImplementation& eglImpl = mEglGraphics->GetEglImplementation();
+ if ( !eglImpl.IsGlesInitialized() )
+ {
+ // Wait until GLES is initialised, but this will happen once.
+ // This method blocks until the render thread has initialised the graphics.
+ mThreadController->WaitForGraphicsInitialization();
+ }
+
+ // Query from GLES and save the cache
+ mIsAdvancedBlendEquationSupported = mEglGraphics->GetGlesInterface().IsAdvancedBlendEquationSupported();
+ mIsAdvancedBlendEquationSupportedCached = true;
+
+ Dali::FileStream configFile( mSystemCacheFilePath, Dali::FileStream::READ | Dali::FileStream::APPEND | Dali::FileStream::TEXT );
+ std::fstream& stream = dynamic_cast<std::fstream&>( configFile.GetStream() );
+ if ( stream.is_open() )
+ {
+ stream << DALI_BLEND_EQUATION_ADVANCED_SUPPORT << " " << mIsAdvancedBlendEquationSupported << std::endl;
+ }
+ else
+ {
+ DALI_LOG_ERROR( "Fail to open file : %s\n", mSystemCacheFilePath.c_str() );
+ }
+ }
+ }
+
+ return mIsAdvancedBlendEquationSupported;
+}
+