/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace
{
const unsigned int DEFAULT_STATISTICS_LOG_FREQUENCY = 2;
+const int DEFAULT_MULTI_SAMPLING_LEVEL = -1;
unsigned int GetIntegerEnvironmentVariable( const char* variable, unsigned int defaultValue )
{
mPanGestureSmoothingAmount(-1.0f),
mPanMinimumDistance(-1),
mPanMinimumEvents(-1),
- mGlesCallTime(0),
- mWindowWidth( 0 ),
- mWindowHeight( 0 )
+ mGlesCallTime( 0 ),
+ mWindowWidth( 0u ),
+ mWindowHeight( 0u ),
+ mThreadingMode( ThreadingMode::COMBINED_UPDATE_RENDER ),
+ mRenderRefreshRate( 1u ),
+ mGlesCallAccumulate( false ),
+ mMultiSamplingLevel( DEFAULT_MULTI_SAMPLING_LEVEL ),
+ mMaxTextureSize( 0 ),
+ mIndicatorVisibleMode( -1 ),
+ mRenderToFboInterval( 0u ),
+ mLogFunction( NULL )
{
ParseEnvironmentOptions();
}
return mGlesCallTime;
}
+bool EnvironmentOptions::GetGlesCallAccumulate() const
+{
+ return mGlesCallAccumulate;
+}
+
const std::string& EnvironmentOptions::GetWindowName() const
{
return mWindowName;
return mWindowClassName;
}
+ThreadingMode::Type EnvironmentOptions::GetThreadingMode() const
+{
+ return mThreadingMode;
+}
+
+unsigned int EnvironmentOptions::GetRenderRefreshRate() const
+{
+ return mRenderRefreshRate;
+}
+
+int EnvironmentOptions::GetMultiSamplingLevel() const
+{
+ return mMultiSamplingLevel;
+}
+
+unsigned int EnvironmentOptions::GetMaxTextureSize() const
+{
+ return mMaxTextureSize;
+}
+
+int EnvironmentOptions::GetIndicatorVisibleMode() const
+{
+ return mIndicatorVisibleMode;
+}
+
+unsigned int EnvironmentOptions::GetRenderToFboInterval() const
+{
+ return mRenderToFboInterval;
+}
+
bool EnvironmentOptions::PerformanceServerRequired() const
{
return ( ( GetPerformanceStatsLoggingOptions() > 0) ||
mGlesCallTime = glesCallTime;
}
+ int glesCallAccumulate( 0 );
+ if ( GetIntegerEnvironmentVariable( DALI_GLES_CALL_ACCUMULATE, glesCallAccumulate ) )
+ {
+ mGlesCallAccumulate = glesCallAccumulate != 0;
+ }
+
int windowWidth(0), windowHeight(0);
if ( GetIntegerEnvironmentVariable( DALI_WINDOW_WIDTH, windowWidth ) && GetIntegerEnvironmentVariable( DALI_WINDOW_HEIGHT, windowHeight ) )
{
{
mWindowClassName = windowClassName;
}
+
+ int threadingMode(0);
+ if ( GetIntegerEnvironmentVariable( DALI_THREADING_MODE, threadingMode ) )
+ {
+ switch( threadingMode )
+ {
+ case ThreadingMode::COMBINED_UPDATE_RENDER:
+ {
+ mThreadingMode = static_cast< ThreadingMode::Type >( threadingMode );
+ break;
+ }
+ }
+ }
+
+ int renderRefreshRate(0);
+ if ( GetIntegerEnvironmentVariable( DALI_REFRESH_RATE, renderRefreshRate ) )
+ {
+ // Only change it if it's valid
+ if( renderRefreshRate > 1 )
+ {
+ mRenderRefreshRate = renderRefreshRate;
+ }
+ }
+
+ int multiSamplingLevel( 0 );
+ if( GetIntegerEnvironmentVariable( DALI_ENV_MULTI_SAMPLING_LEVEL, multiSamplingLevel ) )
+ {
+ mMultiSamplingLevel = multiSamplingLevel;
+ }
+
+ int maxTextureSize( 0 );
+ if( GetIntegerEnvironmentVariable( DALI_ENV_MAX_TEXTURE_SIZE, maxTextureSize ) )
+ {
+ if( maxTextureSize > 0 )
+ {
+ mMaxTextureSize = maxTextureSize;
+ }
+ }
+
+ int indicatorVisibleMode( -1 );
+ if( GetIntegerEnvironmentVariable( DALI_ENV_INDICATOR_VISIBLE_MODE, indicatorVisibleMode ) )
+ {
+ if( indicatorVisibleMode > -1 )
+ {
+ mIndicatorVisibleMode = indicatorVisibleMode;
+ }
+ }
+
+ mRenderToFboInterval = GetIntegerEnvironmentVariable( DALI_RENDER_TO_FBO, 0u );
}
} // Adaptor