[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-core.git] / dali / internal / event / common / scene-impl.cpp
index 45bda4d..208c1f7 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;
 }
@@ -95,7 +105,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();
 
@@ -131,6 +141,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, mSurfaceOrientation, false );