Supports to acknowledge for completing window rotation
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / adaptor-framework / scene-holder-impl.h
index 65e4a7b..7f6c9ff 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_INTERNAL_SCENEHOLDER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/graphics-api/graphics-controller.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/point.h>
 #include <dali/integration-api/events/touch-event-combiner.h>
@@ -160,6 +161,21 @@ public:
   }
 
   /**
+   * @brief Informs the scene that the set surface has been rotated.
+   *
+   * @param[in] width The width of rotated surface
+   * @param[in] height The height of rotated surface
+   * @param[in] orientation The orientation of rotated surface
+   */
+  void SurfaceRotated(float width, float height, int orientation);
+
+  /**
+   * @brief Send message to acknowledge window rotation with current window orientation.
+   * It is to send message to render thread for completing window rotation by user.
+   */
+  void SetRotationCompletedAcknowledgement();
+
+  /**
    * @copydoc Dali::Integration::SceneHolder::FeedTouchPoint
    */
   void FeedTouchPoint(Dali::Integration::Point& point, int timeStamp);
@@ -207,6 +223,11 @@ public:
   void AddFramePresentedCallback(std::unique_ptr<CallbackBase> callback, int32_t frameId);
 
   /**
+   * @brief Creates the render target for the surface when the surface is created/resized/replaced.
+   */
+  void CreateRenderTarget();
+
+  /**
    * @copydoc Dali::Integration::SceneHolder::Get()
    */
   static Dali::Integration::SceneHolder Get(Dali::Actor actor);
@@ -317,6 +338,9 @@ private:
   class SceneHolderLifeCycleObserver;
   std::unique_ptr<SceneHolderLifeCycleObserver> mLifeCycleObserver; ///< The adaptor life cycle observer
 
+private:
+  Graphics::UniquePtr<Graphics::RenderTarget> mRenderTarget{nullptr};
+
 protected:
   uint32_t                 mId;    ///< A unique ID to identify the SceneHolder starting from 0
   Dali::Integration::Scene mScene; ///< The Scene