From 2d57cdc4092bbb9c8935c4196bde26a95e69e6a1 Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 18 Jan 2022 11:29:28 +0900 Subject: [PATCH] [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 --- dali/devel-api/adaptor-framework/window-devel.cpp | 5 +++++ dali/devel-api/adaptor-framework/window-devel.h | 9 +++++++++ dali/internal/window-system/common/window-impl.cpp | 5 +++++ dali/internal/window-system/common/window-impl.h | 5 +++++ dali/internal/window-system/common/window-render-surface.cpp | 9 +++++++-- dali/internal/window-system/common/window-render-surface.h | 7 +++++++ 6 files changed, 38 insertions(+), 2 deletions(-) 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(); -- 2.7.4