Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-manager.cpp
index d9c2ea0..7c56dfb 100644 (file)
@@ -91,8 +91,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() );
@@ -175,8 +174,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,
@@ -262,11 +259,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
@@ -607,7 +599,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
   }
 
   Rect<int32_t> surfaceRect = mImpl->defaultSurfaceRect;
-  int surfaceOrientation = mImpl->defaultSurfaceOrientation;
   Vector4 backgroundColor = mImpl->backgroundColor;
   Integration::DepthBufferAvailable depthBufferAvailable = mImpl->depthBufferAvailable;
   Integration::StencilBufferAvailable stencilBufferAvailable = mImpl->stencilBufferAvailable;
@@ -724,7 +715,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
       {
@@ -743,7 +734,6 @@ void RenderManager::DoRender( RenderInstruction& instruction )
       {
         viewportRect.Set( 0, 0, instruction.mFrameBuffer->GetWidth(), instruction.mFrameBuffer->GetHeight() );
       }
-      surfaceOrientation = 0;
     }
   }
   else // No Offscreen frame buffer rendering
@@ -755,7 +745,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 )
     }
   }
 
-  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 )
@@ -801,8 +784,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() )