From 3a3fbfe13a7b09dfa2fbfa8cabf5a70fb91dd04c Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Mon, 13 Apr 2020 17:06:55 +0900 Subject: [PATCH] [Tizen] Add screen and client rotation itself function This reverts commit 54fd2fdd37c254eeb9764bd5ac4d8f63b43c042c. Change-Id: I162a3a022266a9033b761ca42acce08d2b6b8354 --- .../adaptor-framework/render-surface-interface.h | 6 ++++ .../adaptor-framework/scene-holder-impl.cpp | 7 ++-- .../adaptor-framework/scene-holder-impl.h | 5 +-- dali/internal/window-system/common/window-base.h | 11 +++++++ dali/internal/window-system/common/window-impl.cpp | 32 +++++++++++++++--- .../window-system/common/window-render-surface.cpp | 34 +++++++++++++------ .../window-system/common/window-render-surface.h | 6 ++++ .../ecore-wl/window-base-ecore-wl.cpp | 27 +++++++++++++-- .../tizen-wayland/ecore-wl/window-base-ecore-wl.h | 14 ++++++++ .../ecore-wl2/window-base-ecore-wl2.cpp | 38 +++++++++++++++++----- .../ecore-wl2/window-base-ecore-wl2.h | 14 ++++++++ .../native-render-surface-ecore-wl.cpp | 5 +++ .../tizen-wayland/native-render-surface-ecore-wl.h | 6 ++++ .../ubuntu-x11/pixmap-render-surface-ecore-x.cpp | 5 +++ .../ubuntu-x11/pixmap-render-surface-ecore-x.h | 6 ++++ .../ubuntu-x11/window-base-ecore-x.cpp | 10 ++++++ .../window-system/ubuntu-x11/window-base-ecore-x.h | 11 +++++++ .../window-system/windows/window-base-win.cpp | 8 +++++ .../window-system/windows/window-base-win.h | 11 +++++++ 19 files changed, 225 insertions(+), 31 deletions(-) diff --git a/dali/integration-api/adaptor-framework/render-surface-interface.h b/dali/integration-api/adaptor-framework/render-surface-interface.h index 25ad128..a683a59 100644 --- a/dali/integration-api/adaptor-framework/render-surface-interface.h +++ b/dali/integration-api/adaptor-framework/render-surface-interface.h @@ -100,6 +100,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 */ virtual void InitializeGraphics() = 0; diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp index 2440b35..69f5e89 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp @@ -189,7 +189,7 @@ void SceneHolder::SetSurface(Dali::RenderSurfaceInterface* surface) mScene.SurfaceReplaced(); - SurfaceResized(); + SurfaceResized( false ); unsigned int dpiHorizontal, dpiVertical; dpiHorizontal = dpiVertical = 0; @@ -202,10 +202,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( surfacePositionSize.width ), static_cast( surfacePositionSize.height ) ); + int orientation = mSurface->GetOrientation(); + mScene.SurfaceResized( static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height ), orientation, forceUpdate ); } Dali::RenderSurfaceInterface* SceneHolder::GetSurface() const diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.h b/dali/integration-api/adaptor-framework/scene-holder-impl.h index 3a830f9..318ceeb 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.h +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.h @@ -112,9 +112,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 diff --git a/dali/internal/window-system/common/window-base.h b/dali/internal/window-system/common/window-base.h index 9871611..1be77f9 100644 --- a/dali/internal/window-system/common/window-base.h +++ b/dali/internal/window-system/common/window-base.h @@ -311,6 +311,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 */ virtual int GetScreenRotationAngle() = 0; @@ -320,6 +326,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 */ diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index a0fd809..abbfe21 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -584,7 +584,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 ); @@ -644,7 +650,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 ); @@ -729,8 +741,14 @@ void Window::OnFocusChanged( bool focusIn ) void Window::OnOutputTransformed() { + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + 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 ) ); } @@ -772,7 +790,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 ) ); diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index f86d7c2..789d86e 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -115,6 +115,7 @@ void WindowRenderSurface::Initialize( Any surface ) if( mScreenRotationAngle != 0 ) { mScreenRotationFinished = false; + mResizeFinished = false; } } @@ -145,12 +146,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 ); @@ -202,6 +197,11 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi dpiVertical = mDpiVertical; } +int WindowRenderSurface::GetOrientation() const +{ + return mWindowBase->GetOrientation(); +} + void WindowRenderSurface::InitializeGraphics() { @@ -354,11 +354,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 ); @@ -375,9 +375,22 @@ bool WindowRenderSurface::PreRender( bool resizingSurface ) } // 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" ); @@ -490,6 +503,7 @@ void WindowRenderSurface::OutputTransformed() { mScreenRotationAngle = screenRotationAngle; mScreenRotationFinished = false; + mResizeFinished = false; mOutputTransformedSignal.Emit(); diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index f8160b8..6cab258 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -124,6 +124,12 @@ public: // from Dali::RenderSurfaceInterface virtual 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() */ virtual void InitializeGraphics() override; diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp index 509ddd4..4258b7f 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp @@ -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 @@ -1317,9 +1320,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; } @@ -2062,6 +2066,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; @@ -2075,14 +2089,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 ); diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h index 5811b5c..2d0a4ce 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h @@ -395,6 +395,12 @@ public: virtual 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() */ virtual int GetScreenRotationAngle() override; @@ -405,6 +411,11 @@ public: virtual void SetWindowRotationAngle( int degree ) override; /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle() + */ + virtual int GetWindowRotationAngle() override; + + /** * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted() */ virtual void WindowRotationCompleted( int degree, int width, int height ) override; @@ -475,6 +486,9 @@ private: bool mOwnSurface; + int mWindowRotationAngle; + int mScreenRotationAngle; + int mSupportedPreProtation; #ifdef DALI_ELDBUS_AVAILABLE Eldbus_Connection* mSystemConnection; #endif // DALI_ELDBUS_AVAILABLE diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 89fae58..8c2c04a 100755 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -690,7 +690,10 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2( Dali::PositionSize positionSize, Any sur mBrightnessChangeDone( true ), mOwnSurface( false ), mMoveResizeSerial( 0 ), - mLastSubmittedMoveResizeSerial( 0 ) + mLastSubmittedMoveResizeSerial( 0 ), + mWindowRotationAngle( 0 ), + mScreenRotationAngle( 0 ), + mSupportedPreProtation( 0 ) #ifdef DALI_ELDBUS_AVAILABLE , mSystemConnection( NULL ) #endif @@ -1071,7 +1074,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" ); } } @@ -1081,7 +1084,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 ); WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2( mouseWheelEvent->x, mouseWheelEvent->y ), mouseWheelEvent->z, mouseWheelEvent->timestamp ); @@ -1093,7 +1096,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; @@ -1109,7 +1112,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( "" ); @@ -1171,7 +1174,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" ); std::string keyName( keyEvent->keyname ); std::string logicalKey( "" ); @@ -1513,9 +1516,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; } @@ -2259,6 +2263,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; @@ -2271,15 +2285,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 ); diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index c7a7240..bd4afb5 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -417,6 +417,12 @@ public: virtual 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() */ virtual int GetScreenRotationAngle() override; @@ -427,6 +433,11 @@ public: virtual void SetWindowRotationAngle( int degree ) override; /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle() + */ + virtual int GetWindowRotationAngle() override; + + /** * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted() */ virtual void WindowRotationCompleted( int degree, int width, int height ) override; @@ -501,6 +512,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 diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp index 3ef4f68..7bb678c 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp @@ -142,6 +142,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 ); diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h index e3a33ba..dba6bfd 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h @@ -84,6 +84,12 @@ public: // from Dali::RenderSurfaceInterface virtual 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() */ virtual void InitializeGraphics() override; diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp index 2e93140..b9b9811 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp @@ -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(); diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h index 034fee6..89f2501 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h @@ -82,6 +82,12 @@ public: // from Dali::RenderSurfaceInterface virtual 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() */ virtual void InitializeGraphics() override; diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index ab67b43..77567d4 100755 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -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 ) { } diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h index 8ab7080..f01d32d 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h @@ -329,6 +329,12 @@ public: virtual 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() */ virtual int GetScreenRotationAngle() override; @@ -339,6 +345,11 @@ public: virtual void SetWindowRotationAngle( int degree ) override; /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle() + */ + virtual int GetWindowRotationAngle() override; + + /** * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted() */ virtual void WindowRotationCompleted( int degree, int width, int height ) override; diff --git a/dali/internal/window-system/windows/window-base-win.cpp b/dali/internal/window-system/windows/window-base-win.cpp index c968bea..7c64458 100755 --- a/dali/internal/window-system/windows/window-base-win.cpp +++ b/dali/internal/window-system/windows/window-base-win.cpp @@ -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 +{ +} + unsigned int WindowBaseWin::GetSurfaceId( Any surface ) const { unsigned int surfaceId = 0; diff --git a/dali/internal/window-system/windows/window-base-win.h b/dali/internal/window-system/windows/window-base-win.h index c0a17dc..05b208e 100755 --- a/dali/internal/window-system/windows/window-base-win.h +++ b/dali/internal/window-system/windows/window-base-win.h @@ -327,6 +327,11 @@ public: virtual void SetWindowRotationAngle( int degree ) override; /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetWindowRotationAngle() + */ + virtual void GetWindowRotationAngle() override; + + /** * @copydoc Dali::Internal::Adaptor::WindowBase::WindowRotationCompleted() */ virtual void WindowRotationCompleted( int degree, int width, int height ) override; @@ -337,6 +342,12 @@ public: virtual 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() */ virtual void SetParent( WindowBase* parentWinBase ) override; -- 2.7.4