diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-04-07 14:24:20 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-07 12:07:36 -0400 |
| commit | a1c8c2f1f466fb9e9d10eeb589862e81ce89ae92 (patch) | |
| tree | cfc1bfd180ab2c18ebcb06c53e0516297c96a297 /src/render/pass/SurfacePassElement.cpp | |
| parent | 0448e707fce798d6864320ef629ae681845bde26 (diff) | |
pass/surface: cache texBox
Diffstat (limited to 'src/render/pass/SurfacePassElement.cpp')
| -rw-r--r-- | src/render/pass/SurfacePassElement.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/render/pass/SurfacePassElement.cpp b/src/render/pass/SurfacePassElement.cpp index d3c4e3fc..eef3c11b 100644 --- a/src/render/pass/SurfacePassElement.cpp +++ b/src/render/pass/SurfacePassElement.cpp @@ -18,6 +18,9 @@ CSurfacePassElement::CSurfacePassElement(const CSurfacePassElement::SRenderData& } CBox CSurfacePassElement::getTexBox() { + if (m_texBoxCached) + return m_cachedTexBox; + const double outputX = -m_data.pMonitor->m_position.x, outputY = -m_data.pMonitor->m_position.y; const auto INTERACTIVERESIZEINPROGRESS = m_data.pWindow && g_layoutManager->dragController()->target() && g_layoutManager->dragController()->mode() == MBIND_RESIZE; @@ -69,7 +72,10 @@ CBox CSurfacePassElement::getTexBox() { windowBox.height = m_data.h - m_data.localPos.y; } - return windowBox; + m_cachedTexBox = windowBox; + m_texBoxCached = true; + + return m_cachedTexBox; } bool CSurfacePassElement::needsLiveBlur() { |
