[Tizen] Fix screen rotation bug when application is initialized
authorSeungho, Baek <sbsh.baek@samsung.com>
Tue, 14 Jul 2020 08:33:49 +0000 (17:33 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Tue, 14 Jul 2020 08:33:53 +0000 (17:33 +0900)
This reverts commit 289e521025305e2cb7aebc7c4bdfc16a44a71f76.

Change-Id: I6e09d19fbba70de59109364435eee8b3a4ba45ab

dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-render-surface.cpp

index dbf04f4..1664ed3 100755 (executable)
@@ -807,6 +807,7 @@ void Window::OnOutputTransformed()
   {
     forceUpdate = true;
   }
+  DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), OnOutputTransformed()\n", this, mNativeWindowId );
   SurfaceResized( forceUpdate );
 
   PositionSize positionSize = mSurface->GetPositionSize();
index 7e5808c..4db576f 100644 (file)
@@ -106,14 +106,6 @@ void WindowRenderSurface::Initialize( Any surface )
 
   // Connect signals
   mWindowBase->OutputTransformedSignal().Connect( this, &WindowRenderSurface::OutputTransformed );
-
-  // Check screen rotation
-  mScreenRotationAngle = mWindowBase->GetScreenRotationAngle();
-  if( mScreenRotationAngle != 0 )
-  {
-    mScreenRotationFinished = false;
-    mResizeFinished = false;
-  }
 }
 
 Any WindowRenderSurface::GetNativeWindow()
@@ -224,20 +216,8 @@ void WindowRenderSurface::CreateSurface()
 {
   DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter );
 
-  int width, height;
-  if( mScreenRotationAngle == 0 || mScreenRotationAngle == 180 )
-  {
-    width = mPositionSize.width;
-    height = mPositionSize.height;
-  }
-  else
-  {
-    width = mPositionSize.height;
-    height = mPositionSize.width;
-  }
-
   // Create the EGL window
-  EGLNativeWindowType window = mWindowBase->CreateEglWindow( width, height );
+  EGLNativeWindowType window = mWindowBase->CreateEglWindow( mPositionSize.width, mPositionSize.height );
 
   auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
 
@@ -578,11 +558,11 @@ void WindowRenderSurface::OutputTransformed()
 
     mOutputTransformedSignal.Emit();
 
-    DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OutputTransformed: angle = %d screen rotation = %d\n", mRotationAngle, mScreenRotationAngle );
+    DALI_LOG_RELEASE_INFO( "WindowRenderSurface::OutputTransformed: window = %d screen = %d\n", mRotationAngle, mScreenRotationAngle );
   }
   else
   {
-    DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OutputTransformed: Ignore output transform [%d]\n", mScreenRotationAngle );
+    DALI_LOG_RELEASE_INFO( "WindowRenderSurface::OutputTransformed: Ignore output transform [%d]\n", mScreenRotationAngle );
   }
 }