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
This commit is contained in:
Ikalco 2025-04-30 11:35:25 -05:00 committed by GitHub
parent 5d005f11fa
commit 2ee5118d7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 119 additions and 161 deletions

View file

@ -12,7 +12,6 @@
*/
class CSyncTimeline;
class CEGLSync;
class CSyncReleaser {
public:
@ -22,13 +21,11 @@ class CSyncReleaser {
// drops the releaser, will never signal anymore
void drop();
// wait for this gpu job to finish before releasing
Hyprutils::OS::CFileDescriptor mergeSyncFds(const Hyprutils::OS::CFileDescriptor& fd1, const Hyprutils::OS::CFileDescriptor& fd2);
void addReleaseSync(SP<CEGLSync> sync);
// wait for this sync_fd to signal before releasing
void addSyncFileFd(const Hyprutils::OS::CFileDescriptor& syncFd);
private:
SP<CSyncTimeline> m_timeline;
uint64_t m_point = 0;
Hyprutils::OS::CFileDescriptor m_fd;
SP<CEGLSync> m_sync;
};