renderer: Explicit sync fixes (#7151)

Enables explicit sync by default for most platforms

`misc:no_direct_scanout` -> `render:direct_scanout`
This commit is contained in:
Vaxry 2024-08-06 14:52:19 +01:00 committed by GitHub
parent 0e86808e59
commit 640d161851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 378 additions and 165 deletions

View file

@ -0,0 +1,31 @@
#pragma once
#include <cstdint>
#include <optional>
#include <vector>
#include <functional>
#include "../memory/Memory.hpp"
/*
A helper (inspired by KDE's KWin) that will release the timeline point in the dtor
*/
class CSyncTimeline;
class CEGLSync;
class CSyncReleaser {
public:
CSyncReleaser(WP<CSyncTimeline> timeline_, uint64_t point_);
~CSyncReleaser();
// drops the releaser, will never signal anymore
void drop();
// wait for this gpu job to finish before releasing
void addReleaseSync(SP<CEGLSync> sync);
private:
WP<CSyncTimeline> timeline;
uint64_t point = 0;
SP<CEGLSync> sync;
};