Refactored more code into Actor::Relayouter
[platform/core/uifw/dali-core.git] / dali / internal / event / common / scene-impl.cpp
index 95104fb..7994cdf 100644 (file)
@@ -41,7 +41,7 @@ namespace Dali
 {
 namespace Internal
 {
-ScenePtr Scene::New(Size size, int orientation)
+ScenePtr Scene::New(Size size, int32_t orientation)
 {
   ScenePtr scene = new Scene;
 
@@ -93,7 +93,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, int orientation)
+void Scene::Initialize(Size size, int32_t orientation)
 {
   ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
 
@@ -188,7 +188,7 @@ Dali::Layer Scene::GetLayer(uint32_t depth) const
   return Dali::Layer(mLayerList->GetLayer(depth));
 }
 
-CameraActor& Scene::GetDefaultCameraActor()
+CameraActor& Scene::GetDefaultCameraActor() const
 {
   return *mDefaultCamera;
 }
@@ -277,18 +277,23 @@ void Scene::EmitKeyEventSignal(const Dali::KeyEvent& event)
   }
 }
 
-void Scene::SurfaceRotated(float width, float height, int orientation)
+void Scene::SurfaceRotated(float width, float height, int32_t orientation)
 {
   mSurfaceOrientation = orientation;
   ChangedSurface(width, height, orientation);
 }
 
-int Scene::GetSurfaceOrientation()
+int32_t Scene::GetCurrentSurfaceOrientation() const
 {
-  return mSurfaceOrientation;
+  return mSceneObject->GetSurfaceOrientation();
 }
 
-void Scene::ChangedSurface(float width, float height, int orientation)
+const Rect<int32_t>& Scene::GetCurrentSurfaceRect() const
+{
+  return mSceneObject->GetSurfaceRect();
+}
+
+void Scene::ChangedSurface(float width, float height, int32_t orientation)
 {
   Rect<int32_t> newSize(0, 0, static_cast<int32_t>(width), static_cast<int32_t>(height)); // truncated
   mSize.width  = width;
@@ -316,6 +321,24 @@ bool Scene::IsSurfaceRectChanged() const
   return mSceneObject->IsSurfaceRectChanged();
 }
 
+bool Scene::IsRotationCompletedAcknowledgementSet() const
+{
+  return mSceneObject->IsRotationCompletedAcknowledgementSet();
+}
+
+void Scene::SetRotationCompletedAcknowledgement()
+{
+  ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
+  SetRotationCompletedAcknowledgementMessage(tls->GetEventThreadServices(), *mSceneObject);
+}
+
+void Scene::SetSurfaceRenderTarget(Graphics::RenderTarget* renderTarget)
+{
+  // Send the surface render target to SceneGraph::Scene
+  ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
+  SetSurfaceRenderTargetMessage(tls->GetEventThreadServices(), *mSceneObject, renderTarget);
+}
+
 bool Scene::EmitKeyEventGeneratedSignal(const Dali::KeyEvent& event)
 {
   // Emit the KeyEventGenerated signal when KeyEvent is generated