summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.hpp
diff options
context:
space:
mode:
authorIkalco <73481042+ikalco@users.noreply.github.com>2025-04-30 11:35:25 -0500
committerGitHub <noreply@github.com>2025-04-30 18:35:25 +0200
commit2ee5118d7a4a59d3ccfaed305bfc05c79cea7637 (patch)
tree7c113e64071edbc260060df7e60af9c915b3986a /src/render/OpenGL.hpp
parent5d005f11fa218d26ed2cf6ce75cd9aac9c2c00e5 (diff)
render: properly release rendered buffers (#9807)
* cleanup eglSync * properly release buffers in renderer * add renderingDoneCallback and use it in screencopy * use static constructor for CEGLSync
Diffstat (limited to 'src/render/OpenGL.hpp')
-rw-r--r--src/render/OpenGL.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp
index 414ba103..21602d07 100644
--- a/src/render/OpenGL.hpp
+++ b/src/render/OpenGL.hpp
@@ -150,17 +150,20 @@ struct SCurrentRenderData {
class CEGLSync {
public:
- ~CEGLSync();
+ static UP<CEGLSync> create();
- EGLSyncKHR sync = nullptr;
+ ~CEGLSync();
- Hyprutils::OS::CFileDescriptor&& takeFD();
Hyprutils::OS::CFileDescriptor& fd();
+ Hyprutils::OS::CFileDescriptor&& takeFd();
+ bool isValid();
private:
CEGLSync() = default;
- Hyprutils::OS::CFileDescriptor m_iFd;
+ Hyprutils::OS::CFileDescriptor m_fd;
+ EGLSyncKHR m_sync = EGL_NO_SYNC_KHR;
+ bool m_valid = false;
friend class CHyprOpenGLImpl;
};
@@ -234,7 +237,6 @@ class CHyprOpenGLImpl {
uint32_t getPreferredReadFormat(PHLMONITOR pMonitor);
std::vector<SDRMFormat> getDRMFormats();
EGLImageKHR createEGLImage(const Aquamarine::SDMABUFAttrs& attrs);
- SP<CEGLSync> createEGLSync(int fence = -1);
bool initShaders();
bool m_bShadersInitialized = false;