Revert "[Tizen] Add screen and client rotation itself function"
authorneostom432 <minho.sun@samsung.com>
Mon, 23 Mar 2020 09:23:52 +0000 (18:23 +0900)
committerneostom432 <minho.sun@samsung.com>
Mon, 23 Mar 2020 09:23:52 +0000 (18:23 +0900)
This reverts commit ea137e627e22e817a6d7f29931726865bb5abc52.

19 files changed:
automated-tests/src/dali/dali-test-suite-utils/test-render-surface.cpp
automated-tests/src/dali/dali-test-suite-utils/test-render-surface.h
automated-tests/src/dali/utc-Dali-Scene.cpp
dali/integration-api/render-surface.h
dali/integration-api/scene.cpp
dali/integration-api/scene.h
dali/internal/event/actors/camera-actor-impl.cpp
dali/internal/event/actors/camera-actor-impl.h
dali/internal/event/common/scene-impl.cpp
dali/internal/event/common/scene-impl.h
dali/internal/render/common/render-algorithms.cpp
dali/internal/render/common/render-algorithms.h
dali/internal/render/common/render-instruction.h
dali/internal/render/common/render-manager.cpp
dali/internal/render/common/render-manager.h
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/internal/update/render-tasks/scene-graph-camera.cpp
dali/internal/update/render-tasks/scene-graph-camera.h

index 066b37e9ac2e4178788cb74964aaef73e6fe2098..332d77eb71a4311cc316f682b76f34991f99d338 100644 (file)
@@ -40,11 +40,6 @@ void TestRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVe
   dpiHorizontal = dpiVertical = 96;
 };
 
-int TestRenderSurface::GetOrientation() const
-{
-  return 0;
-};
-
 void TestRenderSurface::InitializeGraphics()
 {
 }
index be38d000a23536dc23aa006bd05046fe2faa3d9a..fba89c25cb2de7f8edb01205e97d3061082adde0 100644 (file)
@@ -52,11 +52,6 @@ public:
    */
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
 
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetOrientation
-   */
-  virtual int GetOrientation() const;
-
   /**
    * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
    */
index ff1c6d7198e3c982e4551e99593965aebbde56dd..b43995714a1dc6e3fc36471660a9366ffd07a0ea 100644 (file)
@@ -1007,7 +1007,7 @@ int UtcDaliSceneSurfaceResizedDefaultScene(void)
   Vector2 newSize( 1000.0f, 2000.0f );
   DALI_TEST_CHECK( stage.GetSize() != newSize );
   defaultSurface->MoveResize( PositionSize( 0, 0, newSize.width, newSize.height ) );
-  defaultScene.SurfaceResized( false );
+  defaultScene.SurfaceResized();
 
   DALI_TEST_EQUALS( stage.GetSize(), newSize, TEST_LOCATION );
   DALI_TEST_EQUALS( defaultScene.GetSize(), newSize, TEST_LOCATION );
@@ -1155,7 +1155,6 @@ int UtcDaliSceneSurfaceResizedAdditionalScene(void)
   Vector2 originalSurfaceSize( 500.0f, 1000.0f );
 
   TestRenderSurface surface( PositionSize( 0.0f, 0.0f, originalSurfaceSize.width, originalSurfaceSize.height ) );
-
   auto scene = Integration::Scene::New( surface );
 
   // Ensure stage size does NOT match the surface size
@@ -1168,7 +1167,7 @@ int UtcDaliSceneSurfaceResizedAdditionalScene(void)
   Vector2 newSize( 1000.0f, 2000.0f );
   DALI_TEST_CHECK( stage.GetSize() != newSize );
   surface.MoveResize( PositionSize( 0, 0, newSize.width, newSize.height ) );
-  scene.SurfaceResized( false );
+  scene.SurfaceResized();
 
   // Ensure the stage hasn't been resized
   DALI_TEST_EQUALS( stage.GetSize(), stageSize, TEST_LOCATION );
index b0a3b373ff10dee36ef01d73acd7b52d324b6963..2270fc241e7fa66238296930ce83dfd3a20b5d39 100644 (file)
@@ -102,12 +102,6 @@ public:
    */
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0;
 
-  /**
-   * @brief Return the orientation of the surface.
-   * @return The orientation
-   */
-  virtual int GetOrientation() const = 0;
-
   /**
    * @brief InitializeGraphics the platform specific graphics surface interfaces
    */
index 5126377a1bbcfcd63c55a416499e17a39d58d024..8fef6dbd75f97fa1314f5ece952e43e36e9174d3 100644 (file)
@@ -124,9 +124,9 @@ void Scene::SetSurface( Integration::RenderSurface& surface )
   GetImplementation(*this).SetSurface( surface );
 }
 
-void Scene::SurfaceResized( bool forceUpdate )
+void Scene::SurfaceResized()
 {
-  GetImplementation( *this ).SurfaceResized( forceUpdate );
+  GetImplementation( *this ).SurfaceResized();
 }
 
 Integration::RenderSurface* Scene::GetSurface() const
index 0d8d0445a9714b7d92f25819351c64e010efd2df..dca7cbca21434f604c36f7710a38a5342e042856 100755 (executable)
@@ -205,7 +205,7 @@ public:
   /**
    * @brief Informs the scene that the set surface has been resized.
    */
-  void SurfaceResized( bool forceUpdate );
+  void SurfaceResized();
 
   /**
    * @brief Gets the rendering surface bound to the scene
index e65135249ef4ef16cfcbde37e660190e6de5cf7d..b531ab62e91260665f9fc2bf1799171c94050b6c 100644 (file)
@@ -522,12 +522,6 @@ const SceneGraph::Camera* CameraActor::GetCamera() const
   return mSceneObject;
 }
 
-void CameraActor::RotateProjection( int rotationAngle )
-{
-  // sceneObject is being used in a separate thread; queue a message to set
-  RotateProjectionMessage( GetEventThreadServices(), *mSceneObject, rotationAngle );
-}
-
 void CameraActor::SetDefaultProperty( Property::Index index, const Property::Value& propertyValue )
 {
   if(index < DEFAULT_ACTOR_PROPERTY_MAX_COUNT)
index 2e1e747fe762c9b46a954c0cb883b5543534d487..ecc36386529b99394205d2989f0eeaadac5624ca 100644 (file)
@@ -195,13 +195,6 @@ public:
    */
   const SceneGraph::Camera* GetCamera() const;
 
-  /**
-   * Rotate the projection.
-   * It is used in case that the target buffer direction is different from the window direction.
-   * @param [in] rotationAngle The rotation angle
-   */
-  void RotateProjection( int rotationAngle );
-
 public: // properties
 
   /**
index ff5c759f9f5ae0b1067a6da56ff0a2a2f454ff74..69b07248573d67f8475f072562ad748457173bc7 100644 (file)
@@ -63,7 +63,6 @@ Scene::Scene()
   mSize(), // Don't set the proper value here, this will be set when the surface is set later
   mDpi(),
   mBackgroundColor( DEFAULT_BACKGROUND_COLOR ),
-  mSurfaceOrientation( 0 ),
   mDepthTreeDirty( false ),
   mEventProcessor( *this, ThreadLocalStorage::GetInternal()->GetGestureEventProcessor() )
 {
@@ -212,39 +211,33 @@ void Scene::SetSurface( Integration::RenderSurface& surface )
     mFrameBuffer = Dali::Internal::FrameBuffer::New( surface, Dali::FrameBuffer::Attachment::NONE );
     defaultRenderTask->SetFrameBuffer( mFrameBuffer );
 
-    SurfaceResized( false );
+    SurfaceResized();
   }
 }
 
-void Scene::SurfaceResized( bool forceUpdate )
+void Scene::SurfaceResized()
 {
   if( mSurface )
   {
     const PositionSize surfacePositionSize = mSurface->GetPositionSize();
     const float fWidth = static_cast< float >( surfacePositionSize.width );
     const float fHeight = static_cast< float >( surfacePositionSize.height );
-    const int orientation = mSurface->GetOrientation();
 
-    if( ( ( fabsf( mSize.width - fWidth ) > Math::MACHINE_EPSILON_1 ) || ( fabsf( mSize.height - fHeight ) > Math::MACHINE_EPSILON_1 ) )
-            || ( orientation != mSurfaceOrientation )
-            || ( forceUpdate ) )
+    if( ( fabsf( mSize.width - fWidth ) > Math::MACHINE_EPSILON_1 ) || ( fabsf( mSize.height - fHeight ) > Math::MACHINE_EPSILON_1 ) )
     {
       Rect< int32_t > newSize( 0, 0, static_cast< int32_t >( surfacePositionSize.width ), static_cast< int32_t >( surfacePositionSize.height ) ); // truncated
 
       mSize.width = fWidth;
       mSize.height = fHeight;
-      mSurfaceOrientation = orientation;
 
       // Calculates the aspect ratio, near and far clipping planes, field of view and camera Z position.
       mDefaultCamera->SetPerspectiveProjection( mSize );
-      mDefaultCamera->RotateProjection( mSurfaceOrientation );
 
       mRootLayer->SetSize( mSize.width, mSize.height );
 
       ThreadLocalStorage* tls = ThreadLocalStorage::GetInternal();
       SceneGraph::UpdateManager& updateManager = tls->GetUpdateManager();
       SetDefaultSurfaceRectMessage( updateManager, newSize );
-      SetDefaultSurfaceOrientationMessage( updateManager, mSurfaceOrientation );
 
       // set default render-task viewport parameters
       RenderTaskPtr defaultRenderTask = mRenderTaskList->GetTask( 0u );
index 49dcc0779642b53f78fe5842bbd13f2f3aa7c51d..01766dfff9f27831fcfb75f618724ecaaacda296 100644 (file)
@@ -122,7 +122,7 @@ public:
   /**
    * Notify the surface has been resized.
    */
-  void SurfaceResized( bool forceUpdate );
+  void SurfaceResized();
 
   /**
    * Notify the surface has been deleted.
@@ -285,9 +285,6 @@ private:
 
   Vector4 mBackgroundColor;
 
-  // The SurfaceOrientation
-  int mSurfaceOrientation;
-
   LayerPtr mRootLayer;
 
   // Ordered list of currently on-stage layers
index a8d2162aa91cc0c96761408f3b3b26035592169d..0061b87e6ed4fd871968e66d6ee43fbafaa12887 100644 (file)
@@ -231,7 +231,7 @@ inline void SetupDepthBuffer( const RenderItem& item, Context& context, bool dep
  * @param[in]     item                     The current RenderItem about to be rendered
  * @param[in]     context                  The context
  */
-inline void RenderAlgorithms::SetupScissorClipping( const RenderItem& item, Context& context, int orientation )
+inline void RenderAlgorithms::SetupScissorClipping( const RenderItem& item, Context& context )
 {
   // Get the number of child scissors in the stack (do not include layer or root box).
   size_t childStackDepth = mScissorStack.size() - 1u;
@@ -292,30 +292,7 @@ inline void RenderAlgorithms::SetupScissorClipping( const RenderItem& item, Cont
     if( scissorEnabled )
     {
       ClippingBox useScissorBox( mScissorStack.back() );
-      GLint x = useScissorBox.x;
-      GLint y = useScissorBox.y;
-      if( orientation == 90 )
-      {
-        x = mViewportRectangle.height - (useScissorBox.y + useScissorBox.height);
-        y = useScissorBox.x;
-        context.Scissor( x, y, useScissorBox.height, useScissorBox.width );
-      }
-      else if( orientation == 180 )
-      {
-        x = mViewportRectangle.width - (useScissorBox.x + useScissorBox.width);
-        y = mViewportRectangle.height - (useScissorBox.y + useScissorBox.height);
-        context.Scissor( x, y, useScissorBox.width, useScissorBox.height );
-      }
-      else if( orientation == 270 )
-      {
-        x = useScissorBox.y;
-        y = mViewportRectangle.width - (useScissorBox.x + useScissorBox.width);
-        context.Scissor( x, y, useScissorBox.height, useScissorBox.width );
-      }
-      else
-      {
-        context.Scissor( x, y, useScissorBox.width, useScissorBox.height );
-      }
+      context.Scissor( useScissorBox.x, useScissorBox.y, useScissorBox.width, useScissorBox.height );
     }
   }
 }
@@ -325,8 +302,7 @@ inline void RenderAlgorithms::SetupClipping( const RenderItem& item,
                                              bool& usedStencilBuffer,
                                              uint32_t& lastClippingDepth,
                                              uint32_t& lastClippingId,
-                                             Integration::StencilBufferAvailable stencilBufferAvailable,
-                                             int orientation )
+                                             Integration::StencilBufferAvailable stencilBufferAvailable )
 {
   RenderMode::Type renderMode = RenderMode::AUTO;
   const Renderer *renderer = item.mRenderer;
@@ -348,7 +324,7 @@ inline void RenderAlgorithms::SetupClipping( const RenderItem& item,
       // As both scissor and stencil clips can be nested, we may be simultaneously traversing up the scissor tree, requiring a scissor to be un-done. Whilst simultaneously adding a new stencil clip.
       // We process both based on our current and old clipping depths for each mode.
       // Both methods with return rapidly if there is nothing to be done for that type of clipping.
-      SetupScissorClipping( item, context, orientation );
+      SetupScissorClipping( item, context );
 
       if( stencilBufferAvailable == Integration::StencilBufferAvailable::TRUE )
       {
@@ -414,8 +390,7 @@ inline void RenderAlgorithms::ProcessRenderList( const RenderList& renderList,
                                                  const Matrix& projectionMatrix,
                                                  Integration::DepthBufferAvailable depthBufferAvailable,
                                                  Integration::StencilBufferAvailable stencilBufferAvailable,
-                                                 Vector<GLuint>& boundTextures,
-                                                 int orientation )
+                                                 Vector<GLuint>& boundTextures )
 {
   DALI_PRINT_RENDER_LIST( renderList );
 
@@ -432,45 +407,13 @@ inline void RenderAlgorithms::ProcessRenderList( const RenderList& renderList,
   mViewportRectangle = context.GetViewport();
   mHasLayerScissor = false;
 
-  if( orientation == 90 || orientation == 270 )
-  {
-    int temp = mViewportRectangle.width;
-    mViewportRectangle.width = mViewportRectangle.height;
-    mViewportRectangle.height = temp;
-  }
-
   // Setup Scissor testing (for both viewport and per-node scissor)
   mScissorStack.clear();
   if( renderList.IsClipping() )
   {
     context.SetScissorTest( true );
     const ClippingBox& layerScissorBox = renderList.GetClippingBox();
-    GLint x = layerScissorBox.x;
-    GLint y = layerScissorBox.y;
-
-    if( orientation == 90 )
-    {
-      x = mViewportRectangle.height - (layerScissorBox.y + layerScissorBox.height);
-      y = layerScissorBox.x;
-      context.Scissor( x, y, layerScissorBox.height, layerScissorBox.width );
-    }
-    else if( orientation == 180 )
-    {
-      x = mViewportRectangle.width - (layerScissorBox.x + layerScissorBox.width);
-      y = mViewportRectangle.height - (layerScissorBox.y + layerScissorBox.height);
-      context.Scissor( x, y, layerScissorBox.width, layerScissorBox.height );
-    }
-    else if( orientation == 270 )
-    {
-      x = layerScissorBox.y;
-      y = mViewportRectangle.width - (layerScissorBox.x + layerScissorBox.width);
-      context.Scissor( x, y, layerScissorBox.height, layerScissorBox.width );
-    }
-    else
-    {
-      context.Scissor( x, y, layerScissorBox.width, layerScissorBox.height );
-    }
-
+    context.Scissor( layerScissorBox.x, layerScissorBox.y, layerScissorBox.width, layerScissorBox.height );
     mScissorStack.push_back( layerScissorBox );
     mHasLayerScissor = true;
   }
@@ -489,7 +432,7 @@ inline void RenderAlgorithms::ProcessRenderList( const RenderList& renderList,
 
     // Set up clipping based on both the Renderer and Actor APIs.
     // The Renderer API will be used if specified. If AUTO, the Actors automatic clipping feature will be used.
-    SetupClipping( item, context, usedStencilBuffer, lastClippingDepth, lastClippingId, stencilBufferAvailable, orientation );
+    SetupClipping( item, context, usedStencilBuffer, lastClippingDepth, lastClippingId, stencilBufferAvailable );
 
     if( DALI_LIKELY( item.mRenderer ) )
     {
@@ -521,8 +464,7 @@ void RenderAlgorithms::ProcessRenderInstruction( const RenderInstruction& instru
                                                  BufferIndex bufferIndex,
                                                  Integration::DepthBufferAvailable depthBufferAvailable,
                                                  Integration::StencilBufferAvailable stencilBufferAvailable,
-                                                 Vector<GLuint>& boundTextures,
-                                                 int orientation )
+                                                 Vector<GLuint>& boundTextures )
 {
   DALI_PRINT_RENDER_INSTRUCTION( instruction, bufferIndex );
 
@@ -551,8 +493,7 @@ void RenderAlgorithms::ProcessRenderInstruction( const RenderInstruction& instru
                            *projectionMatrix,
                             depthBufferAvailable,
                             stencilBufferAvailable,
-                            boundTextures,
-                            orientation );
+                            boundTextures );
       }
     }
   }
index 98c219bf511a5135292589d60320aa1e56a89116..30c8041529904d38123129228b5fd9389e2c05bb 100644 (file)
@@ -65,8 +65,7 @@ class RenderAlgorithms
                                    BufferIndex bufferIndex,
                                    Integration::DepthBufferAvailable depthBufferAvailable,
                                    Integration::StencilBufferAvailable stencilBufferAvailable,
-                                   Vector<GLuint>& boundTextures,
-                                   int orientation);
+                                   Vector<GLuint>& boundTextures );
 
   private:
 
@@ -89,7 +88,7 @@ class RenderAlgorithms
      * @param[in] item     The current RenderItem (about to be rendered)
      * @param[in] context  The current Context
      */
-    inline void SetupScissorClipping( const Dali::Internal::SceneGraph::RenderItem& item, Context& context, int orientation );
+    inline void SetupScissorClipping( const Dali::Internal::SceneGraph::RenderItem& item, Context& context );
 
     /**
      * @brief Set up the clipping based on the specified clipping settings.
@@ -105,8 +104,7 @@ class RenderAlgorithms
                                bool& usedStencilBuffer,
                                uint32_t& lastClippingDepth,
                                uint32_t& lastClippingId,
-                               Integration::StencilBufferAvailable stencilBufferAvailable,
-                               int orientation );
+                               Integration::StencilBufferAvailable stencilBufferAvailable );
 
     /**
      * @brief Process a render-list.
@@ -126,8 +124,7 @@ class RenderAlgorithms
                                    const Matrix& projectionMatrix,
                                    Integration::DepthBufferAvailable depthBufferAvailable,
                                    Integration::StencilBufferAvailable stencilBufferAvailable,
-                                   Vector<GLuint>& boundTextures,
-                                   int orientation );
+                                   Vector<GLuint>& boundTextures );
 
     // Prevent copying:
     RenderAlgorithms( RenderAlgorithms& rhs );
index 3d0d64b76f7a0d30c11de418df5c1a7631cfdb49..3157f85edf3b52f6b7c8531863e54f13f8da83c2 100644 (file)
@@ -121,7 +121,7 @@ public:
   const Matrix* GetProjectionMatrix( BufferIndex index ) const
   {
     // inlined as this is called once per frame per render instruction
-    return &mCamera->GetFinalProjectionMatrix( index );
+    return &mCamera->GetProjectionMatrix( index );
   }
 
 private:
index 910cb054815d6f03c67d0aef2806df3e29ec2e68..a1b527bf85ae96be5e0cb2e3282421e91dd1456b 100644 (file)
@@ -90,8 +90,7 @@ struct RenderManager::Impl
     lastFrameWasRendered( false ),
     programController( glAbstraction ),
     depthBufferAvailable( depthBufferAvailableParam ),
-    stencilBufferAvailable( stencilBufferAvailableParam ),
-    defaultSurfaceOrientation( 0 )
+    stencilBufferAvailable( stencilBufferAvailableParam )
   {
      // Create thread pool with just one thread ( there may be a need to create more threads in the future ).
     threadPool = std::unique_ptr<Dali::ThreadPool>( new Dali::ThreadPool() );
@@ -172,8 +171,6 @@ struct RenderManager::Impl
   std::unique_ptr<Dali::ThreadPool>         threadPool;               ///< The thread pool
   Vector<GLuint>                            boundTextures;            ///< The textures bound for rendering
   Vector<GLuint>                            textureDependencyList;    ///< The dependency list of binded textures
-  int                                       defaultSurfaceOrientation; ///< defaultSurfaceOrientation for the default surface we are rendering to
-
 };
 
 RenderManager* RenderManager::New( Integration::GlAbstraction& glAbstraction,
@@ -254,11 +251,6 @@ void RenderManager::SetDefaultSurfaceRect(const Rect<int32_t>& rect)
   mImpl->defaultSurfaceRect = rect;
 }
 
-void RenderManager::SetDefaultSurfaceOrientation( int orientation )
-{
-  mImpl->defaultSurfaceOrientation = orientation;
-}
-
 void RenderManager::AddRenderer( OwnerPointer< Render::Renderer >& renderer )
 {
   // Initialize the renderer as we are now in render thread
@@ -605,7 +597,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
   }
 
   Rect<int32_t> surfaceRect = mImpl->defaultSurfaceRect;
-  int surfaceOrientation = mImpl->defaultSurfaceOrientation;
   Integration::DepthBufferAvailable depthBufferAvailable = mImpl->depthBufferAvailable;
   Integration::StencilBufferAvailable stencilBufferAvailable = mImpl->stencilBufferAvailable;
 
@@ -713,7 +704,7 @@ void RenderManager::DoRender( RenderInstruction& instruction )
         // For glViewport the lower-left corner is (0,0)
         // For glViewport the lower-left corner is (0,0)
         const int32_t y = ( surfaceRect.height - instruction.mViewport.height ) - instruction.mViewport.y;
-        viewportRect.Set( instruction.mViewport.x, y, instruction.mViewport.width, instruction.mViewport.height );
+        viewportRect.Set( instruction.mViewport.x,  y, instruction.mViewport.width, instruction.mViewport.height );
       }
       else
       {
@@ -732,7 +723,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
       {
         viewportRect.Set( 0, 0, instruction.mFrameBuffer->GetWidth(), instruction.mFrameBuffer->GetHeight() );
       }
-      surfaceOrientation = 0;
     }
   }
   else // No Offscreen frame buffer rendering
@@ -744,7 +734,7 @@ void RenderManager::DoRender( RenderInstruction& instruction )
       {
         // For glViewport the lower-left corner is (0,0)
         const int32_t y = ( instruction.mFrameBuffer->GetHeight() - instruction.mViewport.height ) - instruction.mViewport.y;
-        viewportRect.Set( instruction.mViewport.x, y, instruction.mViewport.width, instruction.mViewport.height );
+        viewportRect.Set( instruction.mViewport.x,  y, instruction.mViewport.width, instruction.mViewport.height );
       }
       else
       {
@@ -768,13 +758,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
     clearFullFrameRect = ( surfaceRect == viewportRect );
   }
 
-  if ( surfaceOrientation == 90 || surfaceOrientation == 270 )
-  {
-    int temp = viewportRect.width;
-    viewportRect.width = viewportRect.height;
-    viewportRect.height = temp;
-  }
-
   mImpl->currentContext->Viewport(viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height);
 
   if( instruction.mIsClearColorSet )
@@ -807,8 +790,7 @@ void RenderManager::DoRender( RenderInstruction& instruction )
       mImpl->renderBufferIndex,
       depthBufferAvailable,
       stencilBufferAvailable,
-      mImpl->boundTextures,
-      surfaceOrientation );
+      mImpl->boundTextures );
 
   // Synchronise the FBO/Texture access when there are multiple contexts
   if ( mImpl->currentContext->IsSurfacelessContextSupported() )
index 0ef87f03c1555ad19d7efb86b2f03eea916e624e..5aa90d8fe0fd5f02f8cb36d05388a57e251e7042 100644 (file)
@@ -134,12 +134,6 @@ public:
    */
   void SetDefaultSurfaceRect( const Rect<int>& rect );
 
-  /**
-   * Returns the orintation for the default surface (probably the application window).
-   * @return Orientation for the surface.
-   */
-  void SetDefaultSurfaceOrientation( int orientation );
-
   /**
    * Add a Renderer to the render manager.
    * @param[in] renderer The renderer to add.
index 1689d13ef8f453c8168f44abf1b11301a16d864f..9b1eae093661fdcef25521e0851f4329c05d4d77 100644 (file)
@@ -1102,17 +1102,6 @@ void UpdateManager::SetDefaultSurfaceRect( const Rect<int32_t>& rect )
   new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetDefaultSurfaceRect, rect );
 }
 
-void UpdateManager::SetDefaultSurfaceOrientation( int orientation )
-{
-  typedef MessageValue1< RenderManager, int > DerivedType;
-
-  // Reserve some memory inside the render queue
-  unsigned int* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
-
-  // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetDefaultSurfaceOrientation, orientation );
-}
-
 void UpdateManager::KeepRendering( float durationSeconds )
 {
   mImpl->keepRenderingSeconds = std::max( mImpl->keepRenderingSeconds, durationSeconds );
index 899db924d02ac425417fc2ea8c0354749d9170e9..a11fc40d28496ad794cf0dffdde88d488b76d14f 100644 (file)
@@ -599,12 +599,6 @@ public:
    */
   void SetDefaultSurfaceRect( const Rect<int>& rect );
 
-  /**
-   * Set the default surface orientation.
-   * @param[in] orientation The orientation value representing the surface.
-   */
-  void SetDefaultSurfaceOrientation( int orientation );
-
   /**
    * @copydoc Dali::Stage::KeepRendering()
    */
@@ -1019,17 +1013,6 @@ inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect<int
   new (slot) LocalType( &manager, &UpdateManager::SetDefaultSurfaceRect, rect );
 }
 
-inline void SetDefaultSurfaceOrientationMessage( UpdateManager& manager, int orientation  )
-{
-  typedef MessageValue1< UpdateManager, int > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::SetDefaultSurfaceOrientation, orientation );
-}
-
 inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds )
 {
   typedef MessageValue1< UpdateManager, float > LocalType;
index 7aca9cbe66e19b31ca03e167fa37555897ae67aa..f6ecce5a4a8b5d8c60d850ed225c3926037b26de 100644 (file)
@@ -157,7 +157,6 @@ const Vector3 Camera::DEFAULT_TARGET_POSITION( 0.0f, 0.0f, 0.0f );
 Camera::Camera()
 : mUpdateViewFlag( UPDATE_COUNT ),
   mUpdateProjectionFlag( UPDATE_COUNT ),
-  mProjectionRotation( 0 ),
   mNode( NULL ),
   mType( DEFAULT_TYPE ),
   mProjectionMode( DEFAULT_MODE ),
@@ -173,8 +172,7 @@ Camera::Camera()
   mTargetPosition( DEFAULT_TARGET_POSITION ),
   mViewMatrix(),
   mProjectionMatrix(),
-  mInverseViewProjection( Matrix::IDENTITY ),
-  mFinalProjection( Matrix::IDENTITY )
+  mInverseViewProjection( Matrix::IDENTITY )
 {
 }
 
@@ -263,12 +261,6 @@ void Camera::SetTargetPosition( const Vector3& targetPosition )
   mUpdateViewFlag = UPDATE_COUNT;
 }
 
-void Camera::RotateProjection( int rotationAngle )
-{
-  mProjectionRotation = rotationAngle;
-  mUpdateViewFlag = UPDATE_COUNT;
-}
-
 const Matrix& Camera::GetProjectionMatrix( BufferIndex bufferIndex ) const
 {
   return mProjectionMatrix[ bufferIndex ];
@@ -284,11 +276,6 @@ const Matrix& Camera::GetInverseViewProjectionMatrix( BufferIndex bufferIndex )
   return mInverseViewProjection[ bufferIndex ];
 }
 
-const Matrix& Camera::GetFinalProjectionMatrix( BufferIndex bufferIndex ) const
-{
-  return mFinalProjection[ bufferIndex ];
-}
-
 const PropertyInputImpl* Camera::GetProjectionMatrix() const
 {
   return &mProjectionMatrix;
@@ -521,38 +508,6 @@ uint32_t Camera::UpdateProjection( BufferIndex updateBufferIndex )
       }
 
       mProjectionMatrix.SetDirty( updateBufferIndex );
-
-      Matrix &finalProjection = mFinalProjection[ updateBufferIndex ];
-      finalProjection.SetIdentity();
-
-      Quaternion rotationAngle;
-      switch( mProjectionRotation )
-      {
-        case 90:
-        {
-          rotationAngle = Quaternion( Dali::ANGLE_90, Vector3::ZAXIS );
-          break;
-        }
-        case 180:
-        {
-          rotationAngle = Quaternion( Dali::ANGLE_180, Vector3::ZAXIS );
-          break;
-        }
-        case 270:
-        {
-          rotationAngle = Quaternion( Dali::ANGLE_270, Vector3::ZAXIS );
-          break;
-        }
-        default:
-          rotationAngle = Quaternion( Dali::ANGLE_0, Vector3::ZAXIS );
-          break;
-      }
-
-      Matrix rotation;
-      rotation.SetIdentity();
-      rotation.SetTransformComponents( Vector3( 1.0f, 1.0f, 1.0f ), rotationAngle, Vector3( 0.0f, 0.0f, 0.0f ) );
-
-      Matrix::Multiply( finalProjection, mProjectionMatrix.Get( updateBufferIndex ), rotation );
     }
     --mUpdateProjectionFlag;
   }
index 37aead69ae93d18d3aea3a89d9256367cf1234e8..d17120f60de78a931a43f01702ccc434c087c99f 100644 (file)
@@ -154,11 +154,6 @@ public:
    */
   void SetFarClippingPlane( float farClippingPlane );
 
-  /**
-   * @copydoc Dali::Internal::CameraActor::RotateProjection
-   */
-  void RotateProjection( int rotationAngle );
-
   /**
    * @copydoc Dali::Internal::CameraActor::SetTarget
    */
@@ -207,13 +202,6 @@ public:
    */
   const Matrix& GetInverseViewProjectionMatrix( BufferIndex bufferIndex ) const;
 
-  /**
-   * Retrieve the final projection-matrix; this is double buffered for input handling.
-   * @param[in] bufferIndex The buffer to read from.
-   * @return The projection-matrix that should be used to render.
-   */
-  const Matrix& GetFinalProjectionMatrix( BufferIndex bufferIndex ) const;
-
   /**
    * Retrieve the projection-matrix property querying interface.
    * @pre The camera is on-stage.
@@ -279,7 +267,6 @@ private:
 
   uint32_t                  mUpdateViewFlag;       ///< This is non-zero if the view matrix requires an update
   uint32_t                  mUpdateProjectionFlag; ///< This is non-zero if the projection matrix requires an update
-  int                       mProjectionRotation;   ///< The rotaion angle of the projection
   const Node*                   mNode;                 ///< The node this scene graph camera belongs to
 
 public:  // PROPERTIES
@@ -302,7 +289,6 @@ public:  // PROPERTIES
 
   DoubleBuffered< FrustumPlanes > mFrustum;               ///< Clipping frustum; double buffered for input handling
   DoubleBuffered< Matrix >        mInverseViewProjection; ///< Inverted viewprojection; double buffered for input handling
-  DoubleBuffered< Matrix >        mFinalProjection;       ///< Final projection matrix; double buffered for input handling
 
 };
 
@@ -440,17 +426,6 @@ inline void SetInvertYAxisMessage( EventThreadServices& eventThreadServices, con
   new (slot) LocalType( &camera, &Camera::SetInvertYAxis, parameter );
 }
 
-inline void RotateProjectionMessage( EventThreadServices& eventThreadServices, const Camera& camera, int parameter )
-{
-  typedef MessageValue1< Camera, int > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &camera, &Camera::RotateProjection, parameter );
-}
-
 } // namespace SceneGraph
 
 } // namespace Internal