[Tizen] Add screen and client rotation itself function
authorWonsik Jung <sidein@samsung.com>
Tue, 10 Nov 2020 06:39:21 +0000 (15:39 +0900)
committerWonsik Jung <sidein@samsung.com>
Tue, 10 Nov 2020 06:39:27 +0000 (15:39 +0900)
This reverts commit d8641796cd8d5ed7fb17bfa517e66f38ace3ff09.

19 files changed:
dali/integration-api/adaptor-framework/render-surface-interface.h
dali/integration-api/adaptor-framework/scene-holder-impl.cpp
dali/integration-api/adaptor-framework/scene-holder-impl.h
dali/internal/window-system/common/window-base.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-render-surface.cpp
dali/internal/window-system/common/window-render-surface.h
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h
dali/internal/window-system/windows/window-base-win.cpp
dali/internal/window-system/windows/window-base-win.h

index 20e19159bbb824ea066d8172a4d7d1b7972a3f38..45250b16a19113fda8f3ae74a3b06e7efd029ecc 100644 (file)
@@ -107,6 +107,12 @@ public:
    */
   virtual void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical) = 0;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const = 0;
+
   /**
    * @brief InitializeGraphics the platform specific graphics surface interfaces
    */
index fc29948ae1e35a1148248d1b84f3e7db1c4b625f..e2027ea3121fce59eefeda810088e54058c18280 100644 (file)
@@ -190,7 +190,7 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface)
 
   mScene.SurfaceReplaced();
 
-  SurfaceResized();
+  SurfaceResized(false);
 
   InitializeDpi();
 
@@ -200,10 +200,11 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface)
   OnSurfaceSet(surface);
 }
 
-void SceneHolder::SurfaceResized()
+void SceneHolder::SurfaceResized(bool forceUpdate)
 {
   PositionSize surfacePositionSize = mSurface->GetPositionSize();
-  mScene.SurfaceResized(static_cast<float>(surfacePositionSize.width), static_cast<float>(surfacePositionSize.height));
+  int          orientation         = mSurface->GetOrientation();
+  mScene.SurfaceResized(static_cast<float>(surfacePositionSize.width), static_cast<float>(surfacePositionSize.height), orientation, forceUpdate);
 
   mSurface->SetFullSwapNextFrame();
 }
index 65e4a7bc1dcaf23d8a9cf97b58acd89140963b2e..2b5ba2f4ced5bc5e68e48050bf24fa6b8b79cb57 100644 (file)
@@ -113,9 +113,10 @@ public:
   void SetSurface(Dali::RenderSurfaceInterface* surface);
 
   /**
-   * @brief Called when the surface set is resized.
+   * @brief Called when the surface is resized.
+   * @param[in] forceUpdate The flag to update force
    */
-  void SurfaceResized();
+  void SurfaceResized( bool forceUpdate );
 
   /**
    * @brief Get the render surface
index ea33d05bb2d5e8f1a79ebef5f0f5882c49675cd3..b3a824dbb98eb5252f14ddd85006bb90b8257f91 100644 (file)
@@ -312,6 +312,12 @@ public:
    */
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) = 0;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const = 0;
+
   /**
    * @brief Get the screen rotation angle of the window
    */
@@ -322,6 +328,11 @@ public:
    */
   virtual void SetWindowRotationAngle( int degree ) = 0;
 
+    /**
+   * @brief Get the rotation angle of the window
+   */
+  virtual int GetWindowRotationAngle() = 0;
+
   /**
    * @brief Inform the window rotation is completed
    */
index fe1dacc44ea84486d5468432c0dd6085931c66e8..1031461f3b3e2a48d6daac77df633282c9550914 100755 (executable)
@@ -578,7 +578,13 @@ void Window::SetSize( Dali::Window::WindowSize size )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    SurfaceResized();
+    bool forceUpdate = false;
+    if( mWindowBase->IsEglWindowRotationSupported() )
+    {
+      forceUpdate = true;
+    }
+
+    SurfaceResized( forceUpdate );
 
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
@@ -641,7 +647,13 @@ void Window::SetPositionSize( PositionSize positionSize )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    SurfaceResized();
+    bool forceUpdate = false;
+    if( mWindowBase->IsEglWindowRotationSupported() )
+    {
+      forceUpdate = true;
+    }
+
+    SurfaceResized( forceUpdate );
 
     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
 
@@ -730,8 +742,15 @@ void Window::OnFocusChanged( bool focusIn )
 
 void Window::OnOutputTransformed()
 {
+  bool forceUpdate = false;
+  if( mWindowBase->IsEglWindowRotationSupported() )
+  {
+    forceUpdate = true;
+  }
+  DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), OnOutputTransformed()\n", this, mNativeWindowId );
+  SurfaceResized( forceUpdate );
+
   PositionSize positionSize = mSurface->GetPositionSize();
-  SurfaceResized();
   mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
   mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 }
@@ -784,7 +803,13 @@ void Window::OnRotation( const RotationEvent& rotation )
 
   mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
 
-  SurfaceResized();
+  bool forceUpdate = false;
+  if( mWindowBase->IsEglWindowRotationSupported() )
+  {
+    forceUpdate = true;
+  }
+
+  SurfaceResized( forceUpdate );
 
   mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
 
index 021843e2f5179915c6e4fcae2357da6e6f293f7c..8a066b00874b7e4b1d824a951c489a6eb144ae9b 100644 (file)
@@ -139,13 +139,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;
-  }
 }
 
 Any WindowRenderSurface::GetNativeWindow()
@@ -175,12 +168,6 @@ 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 )
   {
     mRotationTrigger = TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessRotationRequest ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER );
@@ -232,6 +219,11 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi
   dpiVertical = mDpiVertical;
 }
 
+int WindowRenderSurface::GetOrientation() const
+{
+  return mWindowBase->GetOrientation();
+}
+
 void WindowRenderSurface::InitializeGraphics()
 {
   mGraphics = &mAdaptor->GetGraphicsInterface();
@@ -257,20 +249,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);
 
@@ -457,11 +437,11 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vector<Rec
 
   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 );
 
@@ -478,9 +458,22 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vector<Rec
     }
 
     // Resize case
-    if( !mResizeFinished )
+    if ( !mResizeFinished )
     {
-      mWindowBase->ResizeEglWindow( mPositionSize );
+      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 );
       mResizeFinished = true;
 
       DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: Set resize\n" );
@@ -589,14 +582,15 @@ void WindowRenderSurface::OutputTransformed()
   {
     mScreenRotationAngle = screenRotationAngle;
     mScreenRotationFinished = false;
+    mResizeFinished = false;
 
     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 );
   }
 }
 
index 395656f2a8417c340983ebdabe994766467c4eff..c00395f7f44415496d35acf4aafe7e397ef80314 100644 (file)
@@ -128,6 +128,12 @@ public: // from Dali::RenderSurfaceInterface
    */
   void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics()
    */
index 9157080585c2a7296a079f731668e12bb73c39ae..1b2c93fa4df4dfaca0873cf6e0c804b51b6a4db1 100644 (file)
@@ -585,7 +585,10 @@ WindowBaseEcoreWl::WindowBaseEcoreWl( Dali::PositionSize positionSize, Any surfa
   mBrightness( 0 ),
   mBrightnessChangeState( 0 ),
   mBrightnessChangeDone( true ),
-  mOwnSurface( false )
+  mOwnSurface( false ),
+  mWindowRotationAngle( 0 ),
+  mScreenRotationAngle( 0 ),
+  mSupportedPreProtation( 0 )
 #ifdef DALI_ELDBUS_AVAILABLE
   , mSystemConnection( NULL )
 #endif
@@ -1326,9 +1329,10 @@ bool WindowBaseEcoreWl::IsEglWindowRotationSupported()
   wl_egl_window_capability capability = static_cast< wl_egl_window_capability >( wl_egl_window_get_capabilities( mEglWindow ) );
   if( capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED )
   {
+    mSupportedPreProtation = true;
     return true;
   }
-
+  mSupportedPreProtation = false;
   return false;
 }
 
@@ -2071,6 +2075,16 @@ void WindowBaseEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVe
   dpiVertical   = int( yres + 0.5f );
 }
 
+int WindowBaseEcoreWl::GetOrientation() const
+{
+  int orientation = (mScreenRotationAngle + mWindowRotationAngle) % 360;
+  if( mSupportedPreProtation )
+  {
+    orientation = 0;
+  }
+  return orientation;
+}
+
 int WindowBaseEcoreWl::GetScreenRotationAngle()
 {
   int transform = 0;
@@ -2084,14 +2098,21 @@ int WindowBaseEcoreWl::GetScreenRotationAngle()
     transform = ecore_wl_output_transform_get( ecore_wl_window_output_find( mEcoreWindow ) );
   }
 
-  return transform * 90;
+  mScreenRotationAngle = transform * 90;
+  return mScreenRotationAngle;
 }
 
 void WindowBaseEcoreWl::SetWindowRotationAngle( int degree )
 {
+  mWindowRotationAngle = degree;
   ecore_wl_window_rotation_set( mEcoreWindow, degree );
 }
 
+int WindowBaseEcoreWl::GetWindowRotationAngle()
+{
+  return mWindowRotationAngle;
+}
+
 void WindowBaseEcoreWl::WindowRotationCompleted( int degree, int width, int height )
 {
   ecore_wl_window_rotation_change_done_send( mEcoreWindow );
index 33f9d3d80dd126dde338705a82c471eb5e9f2e4f..b8223cb713b251a8c0641c0d11c13d93382a0d9f 100644 (file)
@@ -394,6 +394,12 @@ public:
    */
   void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
    */
@@ -404,6 +410,11 @@ public:
    */
   void SetWindowRotationAngle( int degree ) override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
+   */
+  virtual int GetWindowRotationAngle() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
@@ -485,6 +496,9 @@ private:
 
   bool                                 mOwnSurface;
 
+  int                                  mWindowRotationAngle;
+  int                                  mScreenRotationAngle;
+  int                                  mSupportedPreProtation;
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE
index 2ac9da8b59fba367c739d2ac0a5d0ce04a4b3183..b596096eba4330d5f44b46447076673ecd222f20 100755 (executable)
@@ -726,7 +726,10 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2( Dali::PositionSize positionSize, Any sur
   mWindowPositionSize( positionSize ),
   mOwnSurface( false ),
   mMoveResizeSerial( 0 ),
-  mLastSubmittedMoveResizeSerial( 0 )
+  mLastSubmittedMoveResizeSerial( 0 ),
+  mWindowRotationAngle( 0 ),
+  mScreenRotationAngle( 0 ),
+  mSupportedPreProtation( 0 )
 #ifdef DALI_ELDBUS_AVAILABLE
   , mSystemConnection( NULL )
 #endif
@@ -1116,7 +1119,7 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel( void* data, int type, void* event
 
     mTouchEventSignal.Emit( point, touchEvent->timestamp );
 
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n" );
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseButtonCancel\n" );
   }
 }
 
@@ -1126,7 +1129,7 @@ void WindowBaseEcoreWl2::OnMouseWheel( void* data, int type, void* event )
 
   if( mouseWheelEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
   {
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );
 
     Integration::WheelEvent wheelEvent( Integration::WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp );
 
@@ -1138,7 +1141,7 @@ void WindowBaseEcoreWl2::OnDetentRotation( void* data, int type, void* event )
 {
   Ecore_Event_Detent_Rotate* detentEvent = static_cast< Ecore_Event_Detent_Rotate* >( event );
 
-  DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n" );
+  DALI_LOG_INFO( gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl2::OnDetentRotation\n" );
 
   int direction = ( detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE ) ? 1 : -1;
   int timeStamp = detentEvent->timestamp;
@@ -1154,7 +1157,7 @@ void WindowBaseEcoreWl2::OnKeyDown( void* data, int type, void* event )
 
   if( keyEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
   {
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n" );
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnKeyDown\n" );
 
     std::string keyName( keyEvent->keyname );
     std::string logicalKey( "" );
@@ -1216,7 +1219,7 @@ void WindowBaseEcoreWl2::OnKeyUp( void* data, int type, void* event )
 
   if( keyEvent->window == static_cast< unsigned int >( ecore_wl2_window_id_get( mEcoreWindow ) ) )
   {
-    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n" );
+    DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnKeyUp\n" );
 
 #if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23)
     // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything.
@@ -1437,7 +1440,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 );
 }
@@ -1577,9 +1588,10 @@ bool WindowBaseEcoreWl2::IsEglWindowRotationSupported()
   wl_egl_window_tizen_capability capability = static_cast< wl_egl_window_tizen_capability >( wl_egl_window_tizen_get_capabilities( mEglWindow ) );
   if( capability == WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED )
   {
+    mSupportedPreProtation = true;
     return true;
   }
-
+  mSupportedPreProtation = false;
   return false;
 }
 
@@ -1637,6 +1649,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 );
 }
 
@@ -2333,6 +2346,16 @@ void WindowBaseEcoreWl2::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiV
   dpiVertical   = int( yres + 0.5f );
 }
 
+int WindowBaseEcoreWl2::GetOrientation() const
+{
+  int orientation = (mScreenRotationAngle + mWindowRotationAngle) % 360;
+  if( mSupportedPreProtation )
+  {
+    orientation = 0;
+  }
+  return orientation;
+}
+
 int WindowBaseEcoreWl2::GetScreenRotationAngle()
 {
   int transform = 0;
@@ -2345,15 +2368,21 @@ int WindowBaseEcoreWl2::GetScreenRotationAngle()
   {
     transform = ecore_wl2_output_transform_get( ecore_wl2_window_output_find( mEcoreWindow ) );
   }
-
-  return transform * 90;
+  mScreenRotationAngle = transform * 90;
+  return mScreenRotationAngle;
 }
 
 void WindowBaseEcoreWl2::SetWindowRotationAngle( int degree )
 {
+  mWindowRotationAngle = degree;
   ecore_wl2_window_rotation_set( mEcoreWindow, degree );
 }
 
+int WindowBaseEcoreWl2::GetWindowRotationAngle()
+{
+  return mWindowRotationAngle;
+}
+
 void WindowBaseEcoreWl2::WindowRotationCompleted( int degree, int width, int height )
 {
   ecore_wl2_window_rotation_change_done_send( mEcoreWindow, degree, width, height );
index cceeabea3b5c50078174aa5a1da1f62e8fac54d9..dbf77349c12b9c26fbdf670484d53eab6166d13f 100644 (file)
@@ -426,6 +426,12 @@ public:
    */
   void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
    */
@@ -436,6 +442,11 @@ public:
    */
   void SetWindowRotationAngle( int degree ) override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
+   */
+  virtual int GetWindowRotationAngle() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
@@ -524,6 +535,9 @@ private:
   volatile uint32_t                    mMoveResizeSerial;
   uint32_t                             mLastSubmittedMoveResizeSerial;
 
+  int                                  mWindowRotationAngle;
+  int                                  mScreenRotationAngle;
+  int                                  mSupportedPreProtation;
 #ifdef DALI_ELDBUS_AVAILABLE
   Eldbus_Connection*                   mSystemConnection;
 #endif // DALI_ELDBUS_AVAILABLE
index 7b7f923a7333dc2424ec589847e116d359467966..118b020adb6590ed68effe57bb368fb529a829a7 100644 (file)
@@ -161,6 +161,11 @@ void NativeRenderSurfaceEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned i
   dpiVertical   = int( yres + 0.5f );
 }
 
+int NativeRenderSurfaceEcoreWl::GetOrientation() const
+{
+  return 0;
+}
+
 void NativeRenderSurfaceEcoreWl::InitializeGraphics()
 {
   DALI_LOG_TRACE_METHOD( gNativeSurfaceLogFilter );
index d21ed86b6941d11bdc99c88b36598d556e55973c..44436f42cc0c4cf2732c33c12cd42bd3c4a49e0f 100644 (file)
@@ -89,6 +89,12 @@ public: // from Dali::RenderSurfaceInterface
    */
   void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics()
    */
index 527f5cc41298465a9f5e1f9513040eb540413339..462279ae4b8311a89e850ad46844c7ae7f4a52a1 100644 (file)
@@ -147,6 +147,11 @@ void PixmapRenderSurfaceEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned in
   dpiVertical   = int( yres + 0.5f );
 }
 
+int PixmapRenderSurfaceEcoreX::GetOrientation() const
+{
+  return 0;
+}
+
 void PixmapRenderSurfaceEcoreX::InitializeGraphics()
 {
   mGraphics = &mAdaptor->GetGraphicsInterface();
index b88c3f6afc3111b978a5359a334d46bbcccd53ef..deb6e5abbd730c200e45570f1743f688549457db 100644 (file)
@@ -81,6 +81,12 @@ public: // from Dali::RenderSurfaceInterface
    */
   void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics()
    */
index 69a3d1b99367bf19b51d12b1b3487e21711cf59e..43551824499fb14564c6aea243ff72a5e7e1e853 100755 (executable)
@@ -834,6 +834,11 @@ void WindowBaseEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVer
   dpiVertical   = ecore_x_dpi_get();
 }
 
+int WindowBaseEcoreX::GetOrientation() const
+{
+  return 0;
+}
+
 int WindowBaseEcoreX::GetScreenRotationAngle()
 {
   return 0;
@@ -843,6 +848,11 @@ void WindowBaseEcoreX::SetWindowRotationAngle( int degree )
 {
 }
 
+int WindowBaseEcoreX::GetWindowRotationAngle()
+{
+  return 0;
+}
+
 void WindowBaseEcoreX::WindowRotationCompleted( int degree, int width, int height )
 {
 }
index 601738b60fc521525072c176c91df6d5f2c19b64..675d790c6bb037bdd58d2804fed440c9847f373e 100644 (file)
@@ -328,6 +328,12 @@ public:
    */
   void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenRotationAngle()
    */
@@ -338,6 +344,11 @@ public:
    */
   void SetWindowRotationAngle( int degree ) override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
+   */
+  virtual int GetWindowRotationAngle() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
index 706c2629b41c473b5645f745582cbecb6fc6317e..ffa0035f39c0271f564a9599fcc6631910516101 100755 (executable)
@@ -454,6 +454,10 @@ void WindowBaseWin::SetWindowRotationAngle( int degree )
 {
 }
 
+int WindowBaseWin::GetWindowRotationAngle()
+{
+}
+
 void WindowBaseWin::WindowRotationCompleted( int degree, int width, int height )
 {
 }
@@ -462,6 +466,10 @@ void WindowBaseWin::SetTransparency( bool transparent )
 {
 }
 
+int WindowBaseWin::GetOrientation() const
+{
+}
+
 uintptr_t WindowBaseWin::GetSurfaceId( Any surface ) const
 {
   uintptr_t surfaceId = 0;
index d93153b7424f828da1211b60bceef5c441d79a7f..06382113f18f4b55edfd94364b528a8b92c4e18a 100755 (executable)
@@ -326,6 +326,11 @@ public:
    */
   void SetWindowRotationAngle( int degree ) override;
 
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle()
+   */
+  virtual void GetWindowRotationAngle() override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted()
    */
@@ -336,6 +341,12 @@ public:
    */
   void SetTransparency( bool transparent ) override;
 
+  /**
+   * @brief Return the orientation of the surface.
+   * @return The orientation
+   */
+  virtual int GetOrientation() const override;
+
   /**
    * @copydoc Dali::Internal::Adaptor::WindowBase::SetParent()
    */