-
-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;
-};
-