Revert "[Tizen] Rotate camera when screen orientation is changed."
authortscholb <scholb.kim@samsung.com>
Wed, 2 Nov 2022 07:51:42 +0000 (16:51 +0900)
committertscholb <scholb.kim@samsung.com>
Wed, 2 Nov 2022 07:51:42 +0000 (16:51 +0900)
This reverts commit 2a18c29f97e51139b4509691b321f6aeccacc2ea.

dali-scene3d/internal/controls/scene-view/scene-view-impl.cpp
dali-scene3d/internal/controls/scene-view/scene-view-impl.h

index 0c5b792..61962b5 100644 (file)
@@ -25,8 +25,6 @@
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
 #include <dali-toolkit/public-api/image-loader/image-url.h>
 #include <dali-toolkit/public-api/image-loader/image.h>
-#include <dali/devel-api/actors/camera-actor-devel.h>
-#include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <dali/integration-api/debug.h>
@@ -58,15 +56,13 @@ BaseHandle Create()
 DALI_TYPE_REGISTRATION_BEGIN(Scene3D::SceneView, Toolkit::Control, Create);
 DALI_TYPE_REGISTRATION_END()
 
-Property::Index   RENDERING_BUFFER    = Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX + 1;
-constexpr int32_t DEFAULT_ORIENTATION = 0;
+Property::Index RENDERING_BUFFER = Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX + 1;
 
 } // anonymous namespace
 
 SceneView::SceneView()
 : Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT)),
-  mIblLoadedCallback(nullptr),
-  mScreenOrientation(DEFAULT_ORIENTATION)
+  mIblLoadedCallback(nullptr)
 {
 }
 
@@ -254,25 +250,12 @@ void SceneView::OnSceneConnection(int depth)
 {
   UpdateRenderTask();
 
-  Window window = DevelWindow::Get(Self());
-  if(window)
-  {
-    window.ResizeSignal().Connect(this, &SceneView::OnWindowResized);
-  }
-
   Control::OnSceneConnection(depth);
 }
 
 void SceneView::OnSceneDisconnection()
 {
   mModels.clear();
-
-  Window window = DevelWindow::Get(Self());
-  if(window)
-  {
-    window.ResizeSignal().Disconnect(this, &SceneView::OnWindowResized);
-  }
-
   Control::OnSceneDisconnection();
 }
 
@@ -424,26 +407,6 @@ void SceneView::UpdateRenderTask()
         mTexture.Reset();
       }
     }
-
-    RotateCamera();
-  }
-}
-
-void SceneView::OnWindowResized(Window window, Window::WindowSize size)
-{
-  mScreenOrientation = DevelWindow::GetPhysicalOrientation(window);
-  RotateCamera();
-}
-
-void SceneView::RotateCamera()
-{
-  if(mUseFrameBuffer)
-  {
-    DevelCameraActor::RotateProjection(mSelectedCamera, DEFAULT_ORIENTATION);
-  }
-  else
-  {
-    DevelCameraActor::RotateProjection(mSelectedCamera, mScreenOrientation);
   }
 }
 
index 8bb0f9f..07ceda4 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/actors/layer.h>
-#include <dali/public-api/adaptor-framework/window.h>
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/weak-handle.h>
 #include <dali/public-api/render-tasks/render-task.h>
@@ -215,16 +214,6 @@ private:
    */
   void OnLoadComplete();
 
-  /*
-   * @brief Callback that will be called when window is resized.
-   */
-  void OnWindowResized(Window window, Window::WindowSize size);
-
-  /**
-   * @brief Update camera's projection orientation according to the screen orientation.
-   */
-  void RotateCamera();
-
 private:
   Toolkit::Visual::Base mVisual;
 
@@ -241,7 +230,6 @@ private:
   CallbackBase* mIblLoadedCallback;
   std::string   mDiffuseIblUrl;
   std::string   mSpecularIblUrl;
-  int32_t       mScreenOrientation;
 
   Layer         mRootLayer;
   Dali::Texture mSpecularTexture;