Merge "Support window rotation" into devel/master
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 13 Jun 2017 10:55:17 +0000 (10:55 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Tue, 13 Jun 2017 10:55:17 +0000 (10:55 +0000)
adaptors/base/environment-options.cpp
adaptors/base/environment-options.h
adaptors/base/environment-variables.h
adaptors/common/adaptor-impl.cpp
adaptors/common/gl/egl-factory.cpp
adaptors/common/gl/egl-factory.h
adaptors/common/gl/egl-implementation.cpp
adaptors/common/gl/egl-implementation.h
adaptors/public-api/dali-adaptor-version.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-compare-types.h
packaging/dali-adaptor.spec

index a029a30..0dbf614 100644 (file)
@@ -107,6 +107,7 @@ EnvironmentOptions::EnvironmentOptions()
   mThreadingMode( ThreadingMode::COMBINED_UPDATE_RENDER ),
   mRenderRefreshRate( 1 ),
   mGlesCallAccumulate( false ),
+  mMultiSamplingLevel( 0 ),
   mLogFunction( NULL )
 {
   ParseEnvironmentOptions();
@@ -253,6 +254,11 @@ unsigned int EnvironmentOptions::GetRenderRefreshRate() const
   return mRenderRefreshRate;
 }
 
+unsigned int EnvironmentOptions::GetMultiSamplingLevel() const
+{
+  return mMultiSamplingLevel;
+}
+
 bool EnvironmentOptions::PerformanceServerRequired() const
 {
   return ( ( GetPerformanceStatsLoggingOptions() > 0) ||
@@ -396,6 +402,15 @@ void EnvironmentOptions::ParseEnvironmentOptions()
       mRenderRefreshRate = renderRefreshRate;
     }
   }
+
+  int multiSamplingLevel( 0 );
+  if( GetIntegerEnvironmentVariable( DALI_ENV_MULTI_SAMPLING_LEVEL, multiSamplingLevel ) )
+  {
+    if( multiSamplingLevel > 0 )
+    {
+      mMultiSamplingLevel = multiSamplingLevel;
+    }
+  }
 }
 
 } // Adaptor
index 792f8ba..dacaa11 100644 (file)
@@ -203,6 +203,11 @@ public:
    */
   unsigned int GetRenderRefreshRate() const;
 
+  /**
+   * @return The number of samples required in multisample buffers
+   */
+  unsigned int GetMultiSamplingLevel() const;
+
 private: // Internal
 
   /**
@@ -238,6 +243,7 @@ private: // Data
   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
 
   Dali::Integration::Log::LogFunction mLogFunction;
 
index a3c2963..fa010f9 100644 (file)
@@ -93,6 +93,8 @@ namespace Adaptor
 
 #define DALI_REFRESH_RATE "DALI_REFRESH_RATE"
 
+#define DALI_ENV_MULTI_SAMPLING_LEVEL "DALI_MULTI_SAMPLING_LEVEL"
+
 } // namespace Adaptor
 
 } // namespace Internal
index ab2ecac..a3dc3ee 100644 (file)
@@ -132,7 +132,7 @@ void Adaptor::Initialize( Dali::Configuration::ContextLoss configuration )
     mGLES = new GlImplementation();
   }
 
-  mEglFactory = new EglFactory();
+  mEglFactory = new EglFactory( mEnvironmentOptions->GetMultiSamplingLevel() );
 
   EglSyncImplementation* eglSyncImpl = mEglFactory->GetSyncImplementation();
 
index 1301016..f9cf846 100644 (file)
@@ -30,11 +30,16 @@ namespace Internal
 namespace Adaptor
 {
 
-EglFactory::EglFactory()
+EglFactory::EglFactory( unsigned int multiSamplingLevel )
 : mEglImplementation(NULL),
   mEglImageExtensions(NULL),
-  mEglSync(new EglSyncImplementation) // Created early, as needed by Core constructor
+  mEglSync(new EglSyncImplementation), // Created early, as needed by Core constructor
+  mMultiSamplingLevel( 4 )
 {
+  if( multiSamplingLevel > 0 )
+  {
+    mMultiSamplingLevel = multiSamplingLevel;
+  }
 }
 
 EglFactory::~EglFactory()
@@ -48,8 +53,8 @@ EglFactory::~EglFactory()
 EglInterface* EglFactory::Create()
 {
   // Created by RenderThread (After Core construction)
-  mEglImplementation = new EglImplementation();
-  mEglImageExtensions = new EglImageExtensions(mEglImplementation);
+  mEglImplementation = new EglImplementation( mMultiSamplingLevel );
+  mEglImageExtensions = new EglImageExtensions( mEglImplementation );
 
   mEglSync->Initialize(mEglImplementation); // The sync impl needs the EglDisplay
   return mEglImplementation;
index a97d555..5b449a1 100644 (file)
@@ -39,7 +39,7 @@ public:
   /**
    * Constructor
    */
-  EglFactory();
+  EglFactory( unsigned int multiSamplingLevel );
 
   /**
    * Destructor
@@ -83,6 +83,8 @@ private:
   EglImplementation* mEglImplementation;
   EglImageExtensions* mEglImageExtensions;
   EglSyncImplementation* mEglSync;
+
+  unsigned int mMultiSamplingLevel;
 };
 
 }
index c73525f..dd2a59e 100644 (file)
@@ -52,7 +52,7 @@ namespace Adaptor
   } \
 }
 
-EglImplementation::EglImplementation()
+EglImplementation::EglImplementation( unsigned int multiSamplingLevel )
   : mEglNativeDisplay(0),
     mEglNativeWindow(0),
     mCurrentEglNativePixmap(0),
@@ -64,7 +64,8 @@ EglImplementation::EglImplementation()
     mIsOwnSurface(true),
     mContextCurrent(false),
     mIsWindow(true),
-    mColorDepth(COLOR_DEPTH_24)
+    mColorDepth(COLOR_DEPTH_24),
+    mMultiSamplingLevel( multiSamplingLevel )
 {
 }
 
@@ -334,7 +335,7 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   configAttribs.PushBack( 8 );
 #ifndef DALI_PROFILE_UBUNTU
   configAttribs.PushBack( EGL_SAMPLES );
-  configAttribs.PushBack( 4 );
+  configAttribs.PushBack( mMultiSamplingLevel );
   configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
   configAttribs.PushBack( 1 );
 #endif // DALI_PROFILE_UBUNTU
index 47976d1..9cad11e 100644 (file)
@@ -42,8 +42,9 @@ class EglImplementation : public EglInterface
 public:
   /**
    * Constructor
+   * @param environmentOptions To check the envirionment options
    */
-  EglImplementation();
+  EglImplementation( unsigned int multiSamplingLevel );
 
   /**
    * Destructor
@@ -193,6 +194,8 @@ private:
   bool                 mContextCurrent;
   bool                 mIsWindow;
   ColorDepth           mColorDepth;
+
+  unsigned int         mMultiSamplingLevel;
 };
 
 } // namespace Adaptor
index 2c58e18..c8fb74b 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 2;
-const unsigned int ADAPTOR_MICRO_VERSION = 42;
+const unsigned int ADAPTOR_MICRO_VERSION = 43;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 248276e..dd6ba24 100644 (file)
@@ -173,9 +173,16 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       result = CompareType<Quaternion>(a, b, epsilon);
       break;
     }
+    case Property::STRING:
+    {
+      std::string a, b;
+      q1.Get(a);
+      q2.Get(b);
+      result = (a.compare(b) == 0);
+      break;
+    }
     case Property::MATRIX:
     case Property::MATRIX3:
-    case Property::STRING:
     case Property::ARRAY:
     case Property::MAP:
     {
index 6233fe3..80b693b 100644 (file)
@@ -14,7 +14,7 @@
 
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.2.42
+Version:    1.2.43
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT