internal: cleanup CMonitor usage and fix a few ref hogs

ref #8221
This commit is contained in:
Vaxry
2024-10-26 02:06:13 +01:00
parent e5384774a8
commit d5689bb539
30 changed files with 116 additions and 118 deletions

View File

@@ -206,30 +206,30 @@ class CHyprOpenGLImpl {
void setDamage(const CRegion& damage, std::optional<CRegion> finalDamage = {});
uint32_t getPreferredReadFormat(PHLMONITOR pMonitor);
std::vector<SDRMFormat> getDRMFormats();
EGLImageKHR createEGLImage(const Aquamarine::SDMABUFAttrs& attrs);
SP<CEGLSync> createEGLSync(int fenceFD);
bool waitForTimelinePoint(SP<CSyncTimeline> timeline, uint64_t point);
std::vector<SDRMFormat> getDRMFormats();
EGLImageKHR createEGLImage(const Aquamarine::SDMABUFAttrs& attrs);
SP<CEGLSync> createEGLSync(int fenceFD);
bool waitForTimelinePoint(SP<CSyncTimeline> timeline, uint64_t point);
SCurrentRenderData m_RenderData;
SCurrentRenderData m_RenderData;
GLint m_iCurrentOutputFb = 0;
GLint m_iCurrentOutputFb = 0;
int m_iGBMFD = -1;
gbm_device* m_pGbmDevice = nullptr;
EGLContext m_pEglContext = nullptr;
EGLDisplay m_pEglDisplay = nullptr;
EGLDeviceEXT m_pEglDevice = nullptr;
int m_iGBMFD = -1;
gbm_device* m_pGbmDevice = nullptr;
EGLContext m_pEglContext = nullptr;
EGLDisplay m_pEglDisplay = nullptr;
EGLDeviceEXT m_pEglDevice = nullptr;
bool m_bReloadScreenShader = true; // at launch it can be set
bool m_bReloadScreenShader = true; // at launch it can be set
PHLWINDOWREF m_pCurrentWindow; // hack to get the current rendered window
PHLLS m_pCurrentLayer; // 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> m_mWindowFramebuffers;
std::map<PHLLSREF, CFramebuffer> m_mLayerFramebuffers;
std::unordered_map<PHLMONITORREF, SMonitorRenderData> m_mMonitorRenderResources;
std::unordered_map<PHLMONITORREF, CFramebuffer> m_mMonitorBGFBs;
std::map<PHLWINDOWREF, CFramebuffer> m_mWindowFramebuffers;
std::map<PHLLSREF, CFramebuffer> m_mLayerFramebuffers;
std::map<PHLMONITORREF, SMonitorRenderData> m_mMonitorRenderResources;
std::map<PHLMONITORREF, CFramebuffer> m_mMonitorBGFBs;
struct {
PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES = nullptr;