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
*/
~Scene() override;
*/
Integration::Scene::WheelEventSignalType& WheelEventSignal();
+ /**
+ * @brief Get ItemsDirtyRects
+ *
+ * @return the ItemsDirtyRects
+ */
+ std::vector<Dali::Internal::SceneGraph::DirtyRect>& GetItemsDirtyRects();
+
public:
/**
* 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;
// The wheel event signal
Integration::Scene::WheelEventSignalType mWheelEventSignal;
+
+ std::vector<Dali::Internal::SceneGraph::DirtyRect> mItemsDirtyRects;
};
} // Internal