From 1c2bd2c818ba7d3cfc0a073f73f660d5ee23de1d Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 4 Apr 2026 23:20:37 +0100 Subject: render/decorations: improve cache performance --- src/render/decorations/DecorationPositioner.hpp | 29 +++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/render/decorations/DecorationPositioner.hpp') diff --git a/src/render/decorations/DecorationPositioner.hpp b/src/render/decorations/DecorationPositioner.hpp index 3010824f..11ca12fd 100644 --- a/src/render/decorations/DecorationPositioner.hpp +++ b/src/render/decorations/DecorationPositioner.hpp @@ -80,23 +80,24 @@ class CDecorationPositioner { }; struct SWindowData { - Vector2D lastWindowSize = {}; - SBoxExtents reserved = {}; - SBoxExtents extents = {}; - SBoxExtents decorationExtents = {}; - SBoxExtents decorationInputExtents = {}; - bool needsRecalc = false; - bool needsDamageExtents = true; + Vector2D lastWindowSize = {}; + SBoxExtents reserved = {}; + SBoxExtents extents = {}; + SBoxExtents decorationExtents = {}; + SBoxExtents decorationInputExtents = {}; + bool needsRecalc = false; + bool needsDamageExtents = true; + std::vector> positioningDatas; }; - std::map m_windowDatas; - std::vector> m_windowPositioningDatas; + std::map m_windowDatas; + bool m_needsSanitize = false; - SWindowPositioningData* getDataFor(IHyprWindowDecoration* pDecoration, PHLWINDOW pWindow); - SBoxExtents computeWindowDecorationExtents(PHLWINDOWREF pWindow, bool inputOnly); - void onWindowUnmap(PHLWINDOW pWindow); - void onWindowMap(PHLWINDOW pWindow); - void sanitizeDatas(); + SWindowPositioningData* getDataFor(IHyprWindowDecoration* pDecoration, PHLWINDOW pWindow); + SBoxExtents computeWindowDecorationExtents(PHLWINDOWREF pWindow, bool inputOnly); + void onWindowUnmap(PHLWINDOW pWindow); + void onWindowMap(PHLWINDOW pWindow); + void sanitizeDatas(); }; inline UP g_pDecorationPositioner; -- cgit v1.2.3