[Tizen] Fix screen rotation bug when application is initialized. 70/232770/2
authorWonsik Jung <sidein@samsung.com>
Thu, 7 May 2020 10:36:59 +0000 (19:36 +0900)
committerWonsik Jung <sidein@samsung.com>
Mon, 15 Jun 2020 02:24:48 +0000 (02:24 +0000)
When DALi application initialized, DALi checks the value of screen rotation.
After that, DALi does not work the screen rotation's process.
To fix, the valid output transform event is used the init time.

Change-Id: I31906c3ac014cd21e453e477599e6dbd8a874f43

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

index 5851ab24021ef397094073e571152009fe2b7b1f..ac3ccc1caa7433ad8dc9700d68724451ac1c4db1 100755 (executable)
@@ -739,6 +739,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 8ecc906f374d3e3574f9d2af93cfefdaa8d6cc50..dacb89e7b74ddc630f073ee8e5dffeee8d3c62e9 100644 (file)
@@ -104,14 +104,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()
@@ -222,20 +214,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);
 
@@ -511,11 +491,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 );
   }
 }