Merge branch 'devel/master' into tizen
authorseungho <seungho@seungho.tn.corp.samsungelectronics.net>
Wed, 28 Oct 2020 12:22:13 +0000 (21:22 +0900)
committerseungho <seungho@seungho.tn.corp.samsungelectronics.net>
Wed, 28 Oct 2020 12:22:13 +0000 (21:22 +0900)
Change-Id: I612dafb547931f225fb9bd4d7dc42dd008a62543

dali/integration-api/scene.cpp
dali/integration-api/scene.h
dali/internal/event/common/scene-impl.cpp
dali/internal/event/common/scene-impl.h

index 9a6af8e..6d69db8 100644 (file)
@@ -33,6 +33,12 @@ Scene Scene::New(Size size)
   return Scene(internal.Get());
 }
 
+Scene Scene::New(Size size, int orientation)
+{
+  Internal::ScenePtr internal = Internal::Scene::New(size, orientation);
+  return Scene(internal.Get());
+}
+
 Scene Scene::DownCast(BaseHandle handle)
 {
   return Scene(dynamic_cast<Dali::Internal::Scene*>(handle.GetObjectPtr()));
index 7d97dd3..e396295 100644 (file)
@@ -72,6 +72,16 @@ public:
   static Scene New(Size size);
 
   /**
+   * @brief Create an initialized Scene handle.
+   *
+   * @param[in] size The size of the set surface for this scene
+   * @param[in] orientation The orientation of the set surface for this scene
+   *
+   * @return a handle to a newly allocated Dali resource.
+   */
+  static Scene New( Size size, int orientation );
+
+  /**
    * @brief Downcast an Object handle to Scene handle.
    *
    * If handle points to a Scene object the downcast produces
index 496fba4..4397ac4 100755 (executable)
@@ -48,7 +48,17 @@ ScenePtr Scene::New( Size size )
   ScenePtr scene = new Scene;
 
   // Second-phase construction
-  scene->Initialize( size );
+  scene->Initialize( size, 0 );
+
+  return scene;
+}
+
+ScenePtr Scene::New( Size size, int orientation )
+{
+  ScenePtr scene = new Scene;
+
+  // Second-phase construction
+  scene->Initialize( size, orientation );
 
   return scene;
 }
@@ -94,7 +104,7 @@ Scene::~Scene()
   // When this destructor is called, the scene has either already been removed from Core or Core has already been destroyed
 }
 
-void Scene::Initialize( Size size )
+void Scene::Initialize( Size size, int orientation )
 {
   ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
 
@@ -130,6 +140,7 @@ void Scene::Initialize( Size size )
   // Create the default render-task and ensure clear is enabled on it to show the background color
   RenderTaskPtr renderTask = mRenderTaskList->CreateTask( mRootLayer.Get(), mDefaultCamera.Get() );
   renderTask->SetClearEnabled(true);
+  mSurfaceOrientation = orientation;
 
   SurfaceResized( size.width, size.height );
 
index 67d08d5..66247bc 100755 (executable)
@@ -117,6 +117,11 @@ public:
   static ScenePtr New( Size size );
 
   /**
+   * @copydoc Dali::Integration::Scene::New
+   */
+  static ScenePtr New( Size size, int orientation );
+
+  /**
    * virtual destructor
    */
   ~Scene() override;
@@ -338,8 +343,9 @@ private:
    * Second-phase constructor.
    *
    * @param[in] size The size of the set surface
+   * @param[in] orientation The orientation of the set surface for this scene
    */
-  void Initialize( Size size );
+  void Initialize( Size size, int orientation );
 
   // Undefined
   Scene(const Scene&) = delete;