summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorAbĂ­lio Costa <abmantis@users.noreply.github.com>2024-02-17 02:09:12 +0000
committerGitHub <noreply@github.com>2024-02-17 02:09:12 +0000
commite3e7e1fdda7660a70bd206aa3ed6a45bb4000376 (patch)
tree1805ec97c0d395016cc1abc663a1f976770cae84 /src/render/Renderer.cpp
parentfbf5ba87ce57752653f3bebf6e2be090c702836e (diff)
monitor: don't damage twice (#4727)
When scaled, the ring is already fully damaged, no need to add the region damage. Also moved a variable that was being declared way to far for where it is actually used. Co-authored-by: Abilio Costa <abilio.costa@criticaltechworks.com>
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index cb4a4335..4032e8d7 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1083,8 +1083,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
clock_gettime(CLOCK_MONOTONIC, &now);
// check the damage
- CRegion damage;
- bool hasChanged = pMonitor->output->needs_frame || pixman_region32_not_empty(&pMonitor->damage.current);
+ bool hasChanged = pMonitor->output->needs_frame || pixman_region32_not_empty(&pMonitor->damage.current);
if (!hasChanged && *PDAMAGETRACKINGMODE != DAMAGE_TRACKING_NONE && pMonitor->forceFullFrames == 0 && damageBlinkCleanup == 0)
return;
@@ -1100,6 +1099,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
if (UNLOCK_SC)
wlr_output_lock_software_cursors(pMonitor->output, true);
+ CRegion damage;
wlr_damage_ring_get_buffer_damage(&pMonitor->damage, m_iLastBufferAge, damage.pixman());
pMonitor->renderingActive = true;