+
+ std::string systemCachePath = GetSystemCachePath();
+ if ( ! systemCachePath.empty() )
+ {
+ Dali::FileStream fileStream( systemCachePath + "gpu-environment.conf", Dali::FileStream::READ | Dali::FileStream::TEXT );
+ std::fstream& stream = dynamic_cast<std::fstream&>( fileStream.GetStream() );
+ if( stream.is_open() )
+ {
+ std::string line;
+ while( std::getline( stream, line ) )
+ {
+ line.erase( line.find_last_not_of( " \t\r\n" ) + 1 );
+ line.erase( 0, line.find_first_not_of( " \t\r\n" ) );
+ if( '#' == *( line.cbegin() ) || line == "" )
+ {
+ continue;
+ }
+
+ std::istringstream stream( line );
+ std::string environmentVariableName, environmentVariableValue;
+ std::getline(stream, environmentVariableName, ' ');
+ if( environmentVariableName == "DALI_ENV_MAX_TEXTURE_SIZE" && mEnvironmentOptions->GetMaxTextureSize() == 0 )
+ {
+ std::getline(stream, environmentVariableValue);
+ setenv( environmentVariableName.c_str() , environmentVariableValue.c_str(), 1 );
+ Dali::TizenPlatform::ImageLoader::SetMaxTextureSize( std::atoi( environmentVariableValue.c_str() ) );
+ }
+ }
+ }
+ else
+ {
+ DALI_LOG_ERROR( "Fail to open file : %s\n", ( systemCachePath + "gpu-environment.conf" ).c_str() );
+ }
+ }