[Tizen] Add to get the status whether window is rotating or not 44/269544/1 submit/tizen_6.5/20220118.074803
authorWonsik Jung <sidein@samsung.com>
Tue, 18 Jan 2022 02:29:28 +0000 (11:29 +0900)
committerWonsik Jung <sidein@samsung.com>
Tue, 18 Jan 2022 06:07:04 +0000 (15:07 +0900)
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
dali/devel-api/adaptor-framework/window-devel.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/common/window-render-surface.cpp
dali/internal/window-system/common/window-render-surface.h

index ae700b1..67fafa3 100644 (file)
@@ -201,6 +201,11 @@ void SendRotationCompletedAcknowledgement(Window window)
   GetImplementation(window).SendRotationCompletedAcknowledgement();
 }
 
+bool IsWindowRotating(Window window)
+{
+  return GetImplementation(window).IsWindowRotating();
+}
+
 } // namespace DevelWindow
 
 } // namespace Dali
index 199dea2..bb066c3 100644 (file)
@@ -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
index c14a0c4..f682484 100644 (file)
@@ -1091,6 +1091,11 @@ void Window::SendRotationCompletedAcknowledgement()
   }
 }
 
+bool Window::IsWindowRotating() const
+{
+  return mWindowSurface->IsWindowRotating();
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index 3e73f6e..af5263c 100644 (file)
@@ -417,6 +417,11 @@ public: // Dali::Internal::Adaptor::SceneHolder
    */
   void SendRotationCompletedAcknowledgement();
 
+  /**
+   * @copydoc Dali::DevelWindow::IsWindowRotating()
+   */
+  bool IsWindowRotating() const;
+
 private:
   /**
    * @brief Enumeration for orietation mode.
index 6c714a8..e4bc5b6 100644 (file)
@@ -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)
index e0ef0ec..4c0ff2f 100644 (file)
@@ -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();