mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01: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:
committed by
Christian Helmuth
parent
2d3c2fc258
commit
c527a4e0e4
@@ -136,6 +136,15 @@ class Genode::Dirty_rect
|
||||
|
||||
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_ */
|
||||
|
||||
Reference in New Issue
Block a user