Changed SceneHolder's RenderTarget initialization
[platform/core/uifw/dali-core.git] / dali / internal / event / common / scene-impl.h
index 96c3bc3..67606d7 100644 (file)
@@ -38,63 +38,9 @@ struct Event;
 
 namespace Internal
 {
-//@todo Break this dependence somehow.
-namespace Render
-{
-class Renderer;
-}
-
 namespace SceneGraph
 {
 class Scene;
-
-struct DirtyRect
-{
-  DirtyRect(Node* node, Render::Renderer* renderer, int frame, Rect<int>& rect)
-  : node(node),
-    renderer(renderer),
-    frame(frame),
-    rect(rect),
-    visited(true)
-  {
-  }
-
-  DirtyRect()
-  : node(nullptr),
-    renderer(nullptr),
-    frame(0),
-    rect(),
-    visited(true)
-  {
-  }
-
-  bool operator<(const DirtyRect& rhs) const
-  {
-    if(node == rhs.node)
-    {
-      if(renderer == rhs.renderer)
-      {
-        return frame > rhs.frame; // Most recent rects come first
-      }
-      else
-      {
-        return renderer < rhs.renderer;
-      }
-    }
-    else
-    {
-      return node < rhs.node;
-    }
-  }
-
-  Node*             node;
-  Render::Renderer* renderer;
-  int               frame;
-
-  Rect<int> rect;
-  bool      visited;
-};
-
 } // namespace SceneGraph
 
 class EventProcessor;
@@ -116,7 +62,7 @@ public:
   /**
    * @copydoc Dali::Integration::Scene::New
    */
-  static ScenePtr New(Size size, int orientation = 0);
+  static ScenePtr New(Size size, int32_t orientation = 0);
 
   /**
    * virtual destructor
@@ -242,14 +188,27 @@ public:
    * @param[in] height The height of rotated surface
    * @param[in] orientation The orientation of rotated surface
    */
-  void SurfaceRotated(float width, float height, int orientation);
+  void SurfaceRotated(float width, float height, int32_t orientation);
 
   /**
-   * @brief Get surface's current orientation
-   *
-   * @return surface orientation
+   * @copydoc Dali::Integration::Scene::SetRotationCompletedAcknowledgement
+   */
+  void SetRotationCompletedAcknowledgement();
+
+  /**
+   * @copydoc Dali::Integration::Scene::IsRotationCompletedAcknowledgementSet
    */
-  int GetSurfaceOrientation();
+  bool IsRotationCompletedAcknowledgementSet() const;
+
+  /**
+   * @copydoc Dali::Integration::Scene::GetCurrentSurfaceOrientation
+   */
+  int32_t GetCurrentSurfaceOrientation() const;
+
+  /**
+   * @copydoc Dali::Integration::Scene::GetCurrentSurfaceRect
+   */
+  const Rect<int32_t>& GetCurrentSurfaceRect() const;
 
   /**
    * @copydoc Dali::Integration::Scene::IsSurfaceRectChanged
@@ -259,7 +218,7 @@ public:
   /**
    * @copydoc Dali::Integration::Scene::SetSurfaceRenderTarget
    */
-  void SetSurfaceRenderTarget(Graphics::RenderTarget* renderTarget);
+  void SetSurfaceRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo);
 
   /**
    * Used by the EventProcessor to emit key event signals.
@@ -338,13 +297,6 @@ public:
    */
   Integration::Scene::WheelEventSignalType& WheelEventSignal();
 
-  /**
-   * @brief Get ItemsDirtyRects
-   *
-   * @return the ItemsDirtyRects
-   */
-  std::vector<Dali::Internal::SceneGraph::DirtyRect>& GetItemsDirtyRects();
-
 public:
   /**
    * From RenderTaskDefaults; retrieve the default root actor.
@@ -356,7 +308,7 @@ public:
    * From RenderTaskDefaults; retrieve the default camera actor.
    * @return The default camera actor.
    */
-  CameraActor& GetDefaultCameraActor() override;
+  CameraActor& GetDefaultCameraActor() const override;
 
 private:
   // Constructor
@@ -368,7 +320,7 @@ private:
    * @param[in] size The size of the set surface
    * @param[in] orientation The orientation of the set surface for this scene
    */
-  void Initialize(Size size, int orientation);
+  void Initialize(Size size, int32_t orientation);
 
   // Undefined
   Scene(const Scene&) = delete;
@@ -383,7 +335,7 @@ private:
    * @param[in] height The height of rotated surface
    * @param[in] orientation The orientation of rotated surface
    */
-  void ChangedSurface(float width, float height, int orientation);
+  void ChangedSurface(float width, float height, int32_t orientation);
 
 private:
   Internal::SceneGraph::Scene* mSceneObject;
@@ -409,7 +361,7 @@ private:
   EventProcessor mEventProcessor;
 
   // The Surface's orientation
-  int mSurfaceOrientation;
+  int32_t mSurfaceOrientation;
 
   // The key event signal
   Integration::Scene::KeyEventSignalType          mKeyEventSignal;
@@ -423,8 +375,6 @@ private:
 
   // The wheel event signal
   Integration::Scene::WheelEventSignalType mWheelEventSignal;
-
-  std::vector<Dali::Internal::SceneGraph::DirtyRect> mItemsDirtyRects;
 };
 
 } // namespace Internal