mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 10:26:00 +01:00
renderer: don't calculate mirror damage without mirrors present
This commit is contained in:
parent
8d68d6bfa5
commit
9c3f3b0018
1 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue