From: Wonsik Jung Date: Tue, 18 Jan 2022 02:29:28 +0000 (+0900) Subject: [Tizen] Add to get the status whether window is rotating or not X-Git-Tag: submit/tizen_6.5/20220118.074803^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=2d57cdc4092bbb9c8935c4196bde26a95e69e6a1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Add to get the status whether window is rotating or not Add to getter api of winow rotation stauts. When window is rotating, the getter api will return true. Otherwise false. Change-Id: Icb2331f75ef88051510008ceb2a1bb3b6cc40529 --- diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index ae700b1..67fafa3 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -201,6 +201,11 @@ void SendRotationCompletedAcknowledgement(Window window) GetImplementation(window).SendRotationCompletedAcknowledgement(); } +bool IsWindowRotating(Window window) +{ + return GetImplementation(window).IsWindowRotating(); +} + } // namespace DevelWindow } // namespace Dali diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index 199dea2..bb066c3 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -392,6 +392,15 @@ DALI_ADAPTOR_API void SetNeedsRotationCompletedAcknowledgement(Window window, bo */ DALI_ADAPTOR_API void SendRotationCompletedAcknowledgement(Window window); +/** + * @brief Query whether window is rotating or not. + * + * @param[in] window The window instance. + * @return true if window is rotating, false otherwise. + */ +DALI_ADAPTOR_API bool IsWindowRotating(Window window); + + } // namespace DevelWindow } // namespace Dali diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index c14a0c4..f682484 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1091,6 +1091,11 @@ void Window::SendRotationCompletedAcknowledgement() } } +bool Window::IsWindowRotating() const +{ + return mWindowSurface->IsWindowRotating(); +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index 3e73f6e..af5263c 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -417,6 +417,11 @@ public: // Dali::Internal::Adaptor::SceneHolder */ void SendRotationCompletedAcknowledgement(); + /** + * @copydoc Dali::DevelWindow::IsWindowRotating() + */ + bool IsWindowRotating() const; + private: /** * @brief Enumeration for orietation mode. diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 6c714a8..e4bc5b6 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -228,7 +228,7 @@ void WindowRenderSurface::RequestRotation(int angle, int width, int height) mWindowBase->SetWindowRotationAngle(mWindowRotationAngle); - DALI_LOG_INFO(gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::Rotate: angle = %d screen rotation = %d\n", mWindowRotationAngle, mScreenRotationAngle); + DALI_LOG_RELEASE_INFO("angle = %d screen rotation = %d, flag = %d\n", mWindowRotationAngle, mScreenRotationAngle, mWindowRotationFinished); } WindowBase* WindowRenderSurface::GetWindowBase() @@ -712,13 +712,18 @@ void WindowRenderSurface::OutputTransformed() } } +bool WindowRenderSurface::IsWindowRotating() const +{ + return !(mWindowRotationFinished); +} + void WindowRenderSurface::ProcessPostRender() { if(!mWindowRotationFinished) { mWindowBase->WindowRotationCompleted(mWindowRotationAngle, mPositionSize.width, mPositionSize.height); - DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done\n"); mWindowRotationFinished = true; + DALI_LOG_RELEASE_INFO("WindowRenderSurface::ProcessPostRender: Rotation Done, flag = %d\n", mWindowRotationFinished); } if(mIsImeWindowSurface) diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index e0ef0ec..4c0ff2f 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -130,6 +130,13 @@ public: // API void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement); /** + * @brief Query whether window is rotating or not. + * + * @return true if window is rotating, false otherwise. + */ + bool IsWindowRotating() const; + + /** * @brief This signal is emitted when the output is transformed. */ OutputSignalType& OutputTransformedSignal();