[Tizen] Add check code with orientation in creating egl window.
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 28 May 2020 05:19:57 +0000 (14:19 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 28 May 2020 05:20:01 +0000 (14:20 +0900)
Change-Id: I237e5f8f3fee06e5a52ad191bf4652d221f2387b

dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp

index 9624c206ff19335ddc20cb4bd624f479d871170f..abbc8d45044053b57b74545e42a5078f77cfabe7 100755 (executable)
@@ -1381,7 +1381,15 @@ int WindowBaseEcoreWl2::GetNativeWindowId()
 
 EGLNativeWindowType WindowBaseEcoreWl2::CreateEglWindow( int width, int height )
 {
-  mEglWindow = wl_egl_window_create( mWlSurface, width, height );
+  int totalAngle = (mWindowRotationAngle + mScreenRotationAngle) % 360;
+  if( totalAngle == 90 || totalAngle == 270 )
+  {
+    mEglWindow = wl_egl_window_create( mWlSurface, height, width );
+  }
+  else
+  {
+    mEglWindow = wl_egl_window_create( mWlSurface, width, height );
+  }
 
   return static_cast< EGLNativeWindowType >( mEglWindow );
 }
@@ -1579,6 +1587,7 @@ void WindowBaseEcoreWl2::SetAvailableAnlges( const std::vector< int >& angles )
 
 void WindowBaseEcoreWl2::SetPreferredAngle( int angle )
 {
+  DALI_LOG_RELEASE_INFO( "WindowBaseEcoreWl2::SetPreferredAngle, angle: %d\n", angle );
   ecore_wl2_window_preferred_rotation_set( mEcoreWindow, angle );
 }