mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-20 11:39:14 +00:00
util/dirty_rect.h: accessor for empty state
Provide an easy way to check for the absence of any dirty pixels. Issue #5344
This commit is contained in:
parent
2d3c2fc258
commit
c527a4e0e4
@ -136,6 +136,15 @@ class Genode::Dirty_rect
|
|||||||
|
|
||||||
rect = rect.valid() ? Rect::compound(rect, added) : added;
|
rect = rect.valid() ? Rect::compound(rect, added) : added;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool empty() const
|
||||||
|
{
|
||||||
|
for (unsigned i = 0; i < NUM_RECTS; i++)
|
||||||
|
if (_rects[i].area.count())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _INCLUDE__UTIL__DIRTY_RECT_H_ */
|
#endif /* _INCLUDE__UTIL__DIRTY_RECT_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user