summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-07-30 11:54:09 +0200
committerGitHub <noreply@github.com>2025-07-30 11:54:09 +0200
commit36a8b2226f42c28092cb8f2d65c0a5ff0da4414f (patch)
treee1a37fe842b35e8b1d2f53ced3c8422b1e371964 /src/render/Renderer.cpp
parent43966cc787c4a8844ac1e7affaadeedde8f4cc60 (diff)
renderer: use CRegion foreach over getRects (#10980)
instead of allocating and returning a vector, use forEach to directly call a function on the rects.
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 43168837..16a6b478 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -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) {