Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-render-surface.cpp
index f52c599..f1e4cb7 100644 (file)
@@ -117,7 +117,6 @@ void WindowRenderSurface::Initialize( Any surface )
   if( mScreenRotationAngle != 0 )
   {
     mScreenRotationFinished = false;
-    mResizeFinished = false;
   }
 }
 
@@ -148,6 +147,12 @@ void WindowRenderSurface::SetTransparency( bool transparent )
 
 void WindowRenderSurface::RequestRotation( int angle, int width, int height )
 {
+  if( !mRotationSupported )
+  {
+    DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::Rotate: Rotation is not supported!\n" );
+    return;
+  }
+
   if( !mRotationTrigger )
   {
     TriggerEventFactoryInterface& triggerFactory = Internal::Adaptor::Adaptor::GetImplementation( Adaptor::Get() ).GetTriggerEventFactoryInterface();
@@ -200,11 +205,6 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi
   dpiVertical = mDpiVertical;
 }
 
-int WindowRenderSurface::GetOrientation() const
-{
-  return mWindowBase->GetOrientation();
-}
-
 void WindowRenderSurface::InitializeGraphics()
 {
 
@@ -355,11 +355,11 @@ bool WindowRenderSurface::PreRender( bool resizingSurface )
 
   if( resizingSurface )
   {
-    int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360;
-
     // Window rotate or screen rotate
     if( !mRotationFinished || !mScreenRotationFinished )
     {
+      int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360;
+
       mWindowBase->SetEglWindowRotation( totalAngle );
       mWindowBase->SetEglWindowBufferTransform( totalAngle );
 
@@ -376,23 +376,9 @@ bool WindowRenderSurface::PreRender( bool resizingSurface )
     }
 
     // Resize case
-    if ( !mResizeFinished )
+    if( !mResizeFinished )
     {
-      Dali::PositionSize positionSize;
-      positionSize.x = mPositionSize.x;
-      positionSize.y = mPositionSize.y;
-      if( totalAngle == 0 || totalAngle == 180 )
-      {
-        positionSize.width = mPositionSize.width;
-        positionSize.height = mPositionSize.height;
-      }
-      else
-      {
-        positionSize.width = mPositionSize.height;
-        positionSize.height = mPositionSize.width;
-      }
-
-      mWindowBase->ResizeEglWindow( positionSize );
+      mWindowBase->ResizeEglWindow( mPositionSize );
       mResizeFinished = true;
 
       DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: Set resize\n" );
@@ -499,7 +485,6 @@ void WindowRenderSurface::OutputTransformed()
   {
     mScreenRotationAngle = screenRotationAngle;
     mScreenRotationFinished = false;
-    mResizeFinished = false;
 
     mOutputTransformedSignal.Emit();