renderer: use CRegion foreach over getRects (#10980)
instead of allocating and returning a vector, use forEach to directly call a function on the rects.
This commit is contained in:
parent
43966cc787
commit
36a8b2226f
4 changed files with 37 additions and 41 deletions
|
|
@ -1966,9 +1966,7 @@ void CHyprRenderer::damageBox(const int& x, const int& y, const int& w, const in
|
|||
}
|
||||
|
||||
void CHyprRenderer::damageRegion(const CRegion& rg) {
|
||||
for (auto const& RECT : rg.getRects()) {
|
||||
damageBox(RECT.x1, RECT.y1, RECT.x2 - RECT.x1, RECT.y2 - RECT.y1);
|
||||
}
|
||||
rg.forEachRect([this](const auto& RECT) { damageBox(RECT.x1, RECT.y1, RECT.x2 - RECT.x1, RECT.y2 - RECT.y1); });
|
||||
}
|
||||
|
||||
void CHyprRenderer::damageMirrorsWith(PHLMONITOR pMonitor, const CRegion& pRegion) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue