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;
+};
+
}
class EventProcessor;
static ScenePtr New( Size size );
/**
+ * @copydoc Dali::Integration::Scene::New
+ */
+ static ScenePtr New( Size size, int orientation );
+
+ /**
* virtual destructor
*/
- virtual ~Scene();
+ ~Scene() override;
/**
* @copydoc Dali::Integration::Scene::Add
*
* @param[in] width The new width of the set surface
* @param[in] height The new height of the set surface
+ * @param[in] orientation The orientation of the surface
+ * @param[in] forceUpdate The flag to update force
*/
- void SurfaceResized( float width, float height );
+ void SurfaceResized( float width, float height, int orientation, bool forceUpdate );
/**
* @copydoc Dali::Integration::Scene::SurfaceReplaced
Integration::Scene::EventProcessingFinishedSignalType& EventProcessingFinishedSignal();
/**
- * @copydoc Integration::Scene::TouchSignal()
+ * @copydoc Integration::Scene::TouchedSignal()
*/
- Integration::Scene::TouchSignalType& TouchSignal();
+ Integration::Scene::TouchEventSignalType& TouchedSignal();
/**
* @copydoc Integration::Scene::sWheelEventSignal()
*/
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.
* @return The default root actor.
*/
- virtual Actor& GetDefaultRootActor();
+ Actor& GetDefaultRootActor() override;
/**
* From RenderTaskDefaults; retrieve the default camera actor.
* @return The default camera actor.
*/
- virtual CameraActor& GetDefaultCameraActor();
+ CameraActor& GetDefaultCameraActor() override;
private:
* Second-phase constructor.
*
* @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 );
+ void Initialize( Size size, int orientation );
// Undefined
Scene(const Scene&) = delete;
Vector4 mBackgroundColor;
+ // The SurfaceOrientation
+ int mSurfaceOrientation;
+
LayerPtr mRootLayer;
// Ordered list of currently on-stage layers
Integration::Scene::EventProcessingFinishedSignalType mEventProcessingFinishedSignal;
// The touch signal
- Integration::Scene::TouchSignalType mTouchSignal;
+ Integration::Scene::TouchEventSignalType mTouchedSignal;
// The wheel event signal
Integration::Scene::WheelEventSignalType mWheelEventSignal;
+
+ std::vector<Dali::Internal::SceneGraph::DirtyRect> mItemsDirtyRects;
};
} // Internal