aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-14 22:33:50 +0000
committerVaxry <[email protected]>2024-02-14 22:33:50 +0000
commit9c3f3b00183c9bcca528d1c74fa29eed0bd747fa (patch)
treef54dc5b43f4034302603b3d7ab12f063966ca018
parent8d68d6bfa5c27a7abea0ac52ddd8757581b34e99 (diff)
downloadHyprland-9c3f3b00183c9bcca528d1c74fa29eed0bd747fa.tar.gz
Hyprland-9c3f3b00183c9bcca528d1c74fa29eed0bd747fa.zip
renderer: don't calculate mirror damage without mirrors present
-rw-r--r--src/render/Renderer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 55d11303..cb4a4335 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1232,20 +1232,20 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
TRACY_GPU_COLLECT;
- // calc frame damage
- CRegion frameDamage{};
+ if (!pMonitor->mirrors.empty()) {
+ CRegion frameDamage{};
- const auto TRANSFORM = wlr_output_transform_invert(pMonitor->output->transform);
- wlr_region_transform(frameDamage.pixman(), pMonitor->lastFrameDamage.pixman(), TRANSFORM, (int)pMonitor->vecTransformedSize.x, (int)pMonitor->vecTransformedSize.y);
+ const auto TRANSFORM = wlr_output_transform_invert(pMonitor->output->transform);
+ wlr_region_transform(frameDamage.pixman(), pMonitor->lastFrameDamage.pixman(), TRANSFORM, (int)pMonitor->vecTransformedSize.x, (int)pMonitor->vecTransformedSize.y);
- if (*PDAMAGETRACKINGMODE == DAMAGE_TRACKING_NONE || *PDAMAGETRACKINGMODE == DAMAGE_TRACKING_MONITOR)
- frameDamage.add(0, 0, (int)pMonitor->vecTransformedSize.x, (int)pMonitor->vecTransformedSize.y);
+ if (*PDAMAGETRACKINGMODE == DAMAGE_TRACKING_NONE || *PDAMAGETRACKINGMODE == DAMAGE_TRACKING_MONITOR)
+ frameDamage.add(0, 0, (int)pMonitor->vecTransformedSize.x, (int)pMonitor->vecTransformedSize.y);
- if (*PDAMAGEBLINK)
- frameDamage.add(damage);
+ if (*PDAMAGEBLINK)
+ frameDamage.add(damage);
- if (!pMonitor->mirrors.empty())
g_pHyprRenderer->damageMirrorsWith(pMonitor, frameDamage);
+ }
pMonitor->renderingActive = false;