namespace
{
const unsigned int DEFAULT_STATISTICS_LOG_FREQUENCY = 2;
+const int DEFAULT_MULTI_SAMPLING_LEVEL = 4;
unsigned int GetIntegerEnvironmentVariable( const char* variable, unsigned int defaultValue )
{
mThreadingMode( ThreadingMode::COMBINED_UPDATE_RENDER ),
mRenderRefreshRate( 1 ),
mGlesCallAccumulate( false ),
- mMultiSamplingLevel( 0 ),
+ mMultiSamplingLevel( DEFAULT_MULTI_SAMPLING_LEVEL ),
mMaxTextureSize( 0 ),
mIndicatorVisibleMode( -1 ),
mLogFunction( NULL )
return mRenderRefreshRate;
}
-unsigned int EnvironmentOptions::GetMultiSamplingLevel() const
+int EnvironmentOptions::GetMultiSamplingLevel() const
{
return mMultiSamplingLevel;
}
int multiSamplingLevel( 0 );
if( GetIntegerEnvironmentVariable( DALI_ENV_MULTI_SAMPLING_LEVEL, multiSamplingLevel ) )
{
- if( multiSamplingLevel > 0 )
- {
- mMultiSamplingLevel = multiSamplingLevel;
- }
+ mMultiSamplingLevel = multiSamplingLevel;
}
int maxTextureSize( 0 );
*/
class EnvironmentOptions
{
-
public:
/**
/**
* @return The number of samples required in multisample buffers
*/
- unsigned int GetMultiSamplingLevel() const;
+ int GetMultiSamplingLevel() const;
/**
* @return The maximum texture size
ThreadingMode::Type mThreadingMode; ///< threading mode
unsigned int mRenderRefreshRate; ///< render refresh rate
bool mGlesCallAccumulate; ///< Whether or not to accumulate gles call statistics
- unsigned int mMultiSamplingLevel; ///< The number of samples required in multisample buffers
+ int mMultiSamplingLevel; ///< The number of samples required in multisample buffers
unsigned int mMaxTextureSize; ///< The maximum texture size that GL can handle
int mIndicatorVisibleMode; ///< Indicator visible mode
namespace Adaptor
{
-EglFactory::EglFactory( unsigned int multiSamplingLevel )
+EglFactory::EglFactory( int multiSamplingLevel )
: mEglImplementation(NULL),
mEglImageExtensions(NULL),
mEglSync(new EglSyncImplementation), // Created early, as needed by Core constructor
- mMultiSamplingLevel( 4 )
+ mMultiSamplingLevel( multiSamplingLevel )
{
- if( multiSamplingLevel > 0 )
- {
- mMultiSamplingLevel = multiSamplingLevel;
- }
}
EglFactory::~EglFactory()
/**
* Constructor
*/
- EglFactory( unsigned int multiSamplingLevel );
+ EglFactory( int multiSamplingLevel );
/**
* Destructor
EglImageExtensions* mEglImageExtensions;
EglSyncImplementation* mEglSync;
- unsigned int mMultiSamplingLevel;
+ int mMultiSamplingLevel;
};
}
} \
}
-EglImplementation::EglImplementation( unsigned int multiSamplingLevel )
+EglImplementation::EglImplementation( int multiSamplingLevel )
: mEglNativeDisplay(0),
mEglNativeWindow(0),
mCurrentEglNativePixmap(0),
configAttribs.PushBack( EGL_STENCIL_SIZE );
configAttribs.PushBack( 8 );
#ifndef DALI_PROFILE_UBUNTU
- configAttribs.PushBack( EGL_SAMPLES );
- configAttribs.PushBack( mMultiSamplingLevel );
- configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
- configAttribs.PushBack( 1 );
+ if( mMultiSamplingLevel != EGL_DONT_CARE )
+ {
+ configAttribs.PushBack( EGL_SAMPLES );
+ configAttribs.PushBack( mMultiSamplingLevel );
+ configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
+ configAttribs.PushBack( 1 );
+ }
#endif // DALI_PROFILE_UBUNTU
configAttribs.PushBack( EGL_NONE );
* Constructor
* @param environmentOptions To check the envirionment options
*/
- EglImplementation( unsigned int multiSamplingLevel );
+ EglImplementation( int multiSamplingLevel );
/**
* Destructor
bool mIsWindow;
ColorDepth mColorDepth;
- unsigned int mMultiSamplingLevel;
+ int mMultiSamplingLevel;
};
} // namespace Adaptor