diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-30 02:41:27 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-30 02:41:27 +0100 |
| commit | 5edc32930d85f5f481160b938965c8bc329487e7 (patch) | |
| tree | 3609cb2bebd1f72e17605022e2b9a2dd526377f6 /src/render/OpenGL.hpp | |
| parent | 5e6f7b1cdb72b394ad8556bb232ac8a406d851b4 (diff) | |
layerSurface: refactor/move to a memory-safe impl
Makes all the pointers smart to avoid memory issues
Refactors layerSurface code to live inside desktop/layersurface
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index bbd022e7..f13d506b 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -154,10 +154,10 @@ class CHyprOpenGLImpl { void makeWindowSnapshot(PHLWINDOW); void makeRawWindowSnapshot(PHLWINDOW, CFramebuffer*); - void makeLayerSnapshot(SLayerSurface*); + void makeLayerSnapshot(PHLLS); void renderSnapshot(PHLWINDOW); - void renderSnapshot(SLayerSurface**); - bool shouldUseNewBlurOptimizations(SLayerSurface* pLayer, PHLWINDOW pWindow); + void renderSnapshot(PHLLS); + bool shouldUseNewBlurOptimizations(PHLLS pLayer, PHLWINDOW pWindow); void clear(const CColor&); void clearWithTex(); @@ -193,11 +193,11 @@ class CHyprOpenGLImpl { bool m_bReloadScreenShader = true; // at launch it can be set - PHLWINDOWREF m_pCurrentWindow; // hack to get the current rendered window - SLayerSurface* m_pCurrentLayer = nullptr; // hack to get the current rendered layer + PHLWINDOWREF m_pCurrentWindow; // hack to get the current rendered window + PHLLS m_pCurrentLayer; // hack to get the current rendered layer std::map<PHLWINDOWREF, CFramebuffer, std::owner_less<PHLWINDOWREF>> m_mWindowFramebuffers; - std::unordered_map<SLayerSurface*, CFramebuffer> m_mLayerFramebuffers; + std::map<PHLLSREF, CFramebuffer, std::owner_less<PHLLSREF>> m_mLayerFramebuffers; std::unordered_map<CMonitor*, SMonitorRenderData> m_mMonitorRenderResources; std::unordered_map<CMonitor*, CFramebuffer> m_mMonitorBGFBs; |
