diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-04-27 12:43:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 12:43:12 +0100 |
| commit | bca7804bb6e1bf5ce5a99b9ae4806be25e36993c (patch) | |
| tree | ebd3a578de1dfe11b54f9440cfc3a408ffa6a620 /src/render/OpenGL.hpp | |
| parent | 25aec3ac8ce65ed224f025f8f6dfef73780577a4 (diff) | |
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1
* format
* remove useless include
* fix pch
* format
* fix crash in dwindle
* fix vram leak
* prefer .expired() for bool checks
Diffstat (limited to 'src/render/OpenGL.hpp')
| -rw-r--r-- | src/render/OpenGL.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 32e2f1eb..bbd022e7 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -7,6 +7,7 @@ #include "../helpers/Region.hpp" #include <list> #include <unordered_map> +#include <map> #include <cairo/cairo.h> @@ -151,12 +152,12 @@ class CHyprOpenGLImpl { void blend(bool enabled); - void makeWindowSnapshot(CWindow*); - void makeRawWindowSnapshot(CWindow*, CFramebuffer*); + void makeWindowSnapshot(PHLWINDOW); + void makeRawWindowSnapshot(PHLWINDOW, CFramebuffer*); void makeLayerSnapshot(SLayerSurface*); - void renderSnapshot(CWindow**); + void renderSnapshot(PHLWINDOW); void renderSnapshot(SLayerSurface**); - bool shouldUseNewBlurOptimizations(SLayerSurface* pLayer, CWindow* pWindow); + bool shouldUseNewBlurOptimizations(SLayerSurface* pLayer, PHLWINDOW pWindow); void clear(const CColor&); void clearWithTex(); @@ -192,13 +193,13 @@ class CHyprOpenGLImpl { bool m_bReloadScreenShader = true; // at launch it can be set - CWindow* m_pCurrentWindow = nullptr; // 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 + SLayerSurface* m_pCurrentLayer = nullptr; // hack to get the current rendered layer - std::unordered_map<CWindow*, CFramebuffer> m_mWindowFramebuffers; - std::unordered_map<SLayerSurface*, CFramebuffer> m_mLayerFramebuffers; - std::unordered_map<CMonitor*, SMonitorRenderData> m_mMonitorRenderResources; - std::unordered_map<CMonitor*, CFramebuffer> m_mMonitorBGFBs; + std::map<PHLWINDOWREF, CFramebuffer, std::owner_less<PHLWINDOWREF>> m_mWindowFramebuffers; + std::unordered_map<SLayerSurface*, CFramebuffer> m_mLayerFramebuffers; + std::unordered_map<CMonitor*, SMonitorRenderData> m_mMonitorRenderResources; + std::unordered_map<CMonitor*, CFramebuffer> m_mMonitorBGFBs; struct { PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES = nullptr; |
